mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
Merge pull request #91764 from KobayashiD27/add-test-case-apis-scheduler-helpers
Add test case in apis/scheduling/v1/helpers.go to improve the test co…
This commit is contained in:
commit
3a8d130fdf
@ -46,6 +46,29 @@ func TestIsKnownSystemPriorityClass(t *testing.T) {
|
|||||||
},
|
},
|
||||||
expected: false,
|
expected: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "not a known system priority class",
|
||||||
|
pc: &v1.PriorityClass{
|
||||||
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
|
Name: "unknown",
|
||||||
|
},
|
||||||
|
Value: scheduling.SystemCriticalPriority,
|
||||||
|
Description: "Used for system critical pods that must run in the cluster, but can be moved to another node if necessary.",
|
||||||
|
},
|
||||||
|
expected: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "global default changed",
|
||||||
|
pc: &v1.PriorityClass{
|
||||||
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
|
Name: scheduling.SystemClusterCritical,
|
||||||
|
},
|
||||||
|
GlobalDefault: true,
|
||||||
|
Value: scheduling.SystemCriticalPriority,
|
||||||
|
Description: "Used for system critical pods that must run in the cluster, but can be moved to another node if necessary.",
|
||||||
|
},
|
||||||
|
expected: false,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, test := range tests {
|
for _, test := range tests {
|
||||||
|
Loading…
Reference in New Issue
Block a user