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:
Kubernetes Prow Robot 2020-06-06 00:55:45 -07:00 committed by GitHub
commit 3a8d130fdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,6 +46,29 @@ func TestIsKnownSystemPriorityClass(t *testing.T) {
},
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 {