Use Fatalf instead of Errorf when mounter/unmounter if nil in volume tests
This commit is contained in:
@@ -221,7 +221,7 @@ func TestPluginBackCompat(t *testing.T) {
|
||||
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")
|
||||
}
|
||||
|
||||
volPath := mounter.GetPath()
|
||||
@@ -249,6 +249,9 @@ func TestMetrics(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Errorf("Failed to make a new Mounter: %v", err)
|
||||
}
|
||||
if mounter == nil {
|
||||
t.Fatalf("Got a nil Mounter")
|
||||
}
|
||||
|
||||
// Need to create the subdirectory
|
||||
os.MkdirAll(mounter.GetPath(), 0755)
|
||||
|
Reference in New Issue
Block a user