From af6b4e39c2afa7cf9a151e6fbfb5bd3089bbe649 Mon Sep 17 00:00:00 2001 From: YuxiJin-tobeyjin Date: Wed, 31 Jan 2018 11:39:31 +0800 Subject: [PATCH] codeClean-merge-logfAndFailnow-to-fatalf --- pkg/kubelet/cm/node_container_manager_test.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pkg/kubelet/cm/node_container_manager_test.go b/pkg/kubelet/cm/node_container_manager_test.go index 675ff636f8e..a50157e63a3 100644 --- a/pkg/kubelet/cm/node_container_manager_test.go +++ b/pkg/kubelet/cm/node_container_manager_test.go @@ -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) } } }