codeClean-merge-logfAndFailnow-to-fatalf

This commit is contained in:
YuxiJin-tobeyjin 2018-01-31 11:39:31 +08:00
parent 7595560a0c
commit af6b4e39c2

View File

@ -339,11 +339,9 @@ func TestNodeAllocatableInputValidation(t *testing.T) {
}
err := cm.validateNodeAllocatable()
if err == nil && tc.invalidConfiguration {
t.Logf("Expected invalid node allocatable configuration")
t.FailNow()
t.Fatalf("Expected invalid node allocatable configuration")
} else if err != nil && !tc.invalidConfiguration {
t.Logf("Expected valid node allocatable configuration: %v", err)
t.FailNow()
t.Fatalf("Expected valid node allocatable configuration: %v", err)
}
}
@ -386,11 +384,9 @@ func TestNodeAllocatableInputValidation(t *testing.T) {
}
err := cm.validateNodeAllocatable()
if err == nil && tc.invalidConfiguration {
t.Logf("Expected invalid node allocatable configuration")
t.FailNow()
t.Fatalf("Expected invalid node allocatable configuration")
} else if err != nil && !tc.invalidConfiguration {
t.Logf("Expected valid node allocatable configuration: %v", err)
t.FailNow()
t.Fatalf("Expected valid node allocatable configuration: %v", err)
}
}
}