fix some bugs inside csi unit test TestAttacherMountDevice
This commit is contained in:
@@ -474,7 +474,7 @@ func TestAttacherMountDevice(t *testing.T) {
|
|||||||
devicePath: "",
|
devicePath: "",
|
||||||
deviceMountPath: "path2",
|
deviceMountPath: "path2",
|
||||||
stageUnstageSet: true,
|
stageUnstageSet: true,
|
||||||
shouldFail: true,
|
shouldFail: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
testName: "no device mount path",
|
testName: "no device mount path",
|
||||||
@@ -539,7 +539,7 @@ func TestAttacherMountDevice(t *testing.T) {
|
|||||||
if !tc.shouldFail {
|
if !tc.shouldFail {
|
||||||
t.Errorf("test should not fail, but error occurred: %v", err)
|
t.Errorf("test should not fail, but error occurred: %v", err)
|
||||||
}
|
}
|
||||||
return
|
continue
|
||||||
}
|
}
|
||||||
if err == nil && tc.shouldFail {
|
if err == nil && tc.shouldFail {
|
||||||
t.Errorf("test should fail, but no error occurred")
|
t.Errorf("test should fail, but no error occurred")
|
||||||
|
Reference in New Issue
Block a user