Use Fatalf instead of Errorf when mounter/unmounter if nil in volume tests

This commit is contained in:
xiangpengzhao
2016-12-19 02:42:14 -05:00
parent 2b08d1e5a1
commit 35b45d60b2
12 changed files with 38 additions and 11 deletions

View File

@@ -241,7 +241,7 @@ func newDownwardAPITest(t *testing.T, name string, volumeFiles, podLabels, podAn
t.Errorf("Failed to make a new Mounter: %v", err)
}
if mounter == nil {
t.Errorf("Got a nil Mounter")
t.Fatalf("Got a nil Mounter")
}
volumePath := mounter.GetPath()
@@ -278,7 +278,7 @@ func (test *downwardAPITest) tearDown() {
test.t.Errorf("Failed to make a new Unmounter: %v", err)
}
if unmounter == nil {
test.t.Errorf("Got a nil Unmounter")
test.t.Fatalf("Got a nil Unmounter")
}
if err := unmounter.TearDown(); err != nil {