mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
Add test case in apis/scheduling/v1/helpers.go to improve the test coverage
This commit is contained in:
parent
ca7a906ab7
commit
7026cbc1d4
@ -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