cleanup: remove useless test

This commit is contained in:
Kensei Nakada 2023-10-22 04:41:59 +00:00
parent 2f270bd996
commit fb6b10997a
2 changed files with 1 additions and 17 deletions

View File

@ -73,6 +73,7 @@ type PluginScore struct {
type Code int
// These are predefined codes used in a Status.
// Note: when you add a new status, you have to add it in `codes` slice below.
const (
// Success means that plugin ran correctly and found pod schedulable.
// NOTE: A nil status is also considered as "Success".

View File

@ -123,23 +123,6 @@ func TestStatus(t *testing.T) {
}
}
// The String() method relies on the value and order of the status codes to function properly.
func TestStatusCodes(t *testing.T) {
assertStatusCode(t, Success, 0)
assertStatusCode(t, Error, 1)
assertStatusCode(t, Unschedulable, 2)
assertStatusCode(t, UnschedulableAndUnresolvable, 3)
assertStatusCode(t, Wait, 4)
assertStatusCode(t, Skip, 5)
assertStatusCode(t, Pending, 6)
}
func assertStatusCode(t *testing.T, code Code, value int) {
if int(code) != value {
t.Errorf("Status code %q should have a value of %v but got %v", code.String(), value, int(code))
}
}
func TestPreFilterResultMerge(t *testing.T) {
tests := map[string]struct {
receiver *PreFilterResult