Merge pull request #59088 from YuxiJin-tobeyjin/codeClean-merge-logfAndFailnow-to-fatalf

Automatic merge from submit-queue (batch tested with PRs 60106, 59510, 60263, 60063, 59088). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

CodeClean, merge Logf And FailNow to Fatalf

**What this PR does / why we need it**:
Trivial changes to clean code, merge Logf And FailNow to Fatalf.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
"NONE"
```
This commit is contained in:
Kubernetes Submit Queue 2018-02-23 02:59:55 -08:00 committed by GitHub
commit d5aba0c6ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)
}
}
}