mirror of https://github.com/k3s-io/k3s
Merge pull request #62590 from mlmhl/csi_test
Automatic merge from submit-queue (batch tested with PRs 62590, 62818, 63015, 62922, 63000). 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>. Fix some bugs inside CSI volume plugin unit test TestAttacherMountDevice **What this PR does / why we need it**: Fix two bugs inside CSI volume plugin unit test `TestAttacherMountDevice`. **Release note**: ```release-note None ```pull/8/head
commit
b692b7159a
|
@ -468,7 +468,7 @@ func TestAttacherMountDevice(t *testing.T) {
|
|||
devicePath: "",
|
||||
deviceMountPath: "path2",
|
||||
stageUnstageSet: true,
|
||||
shouldFail: true,
|
||||
shouldFail: false,
|
||||
},
|
||||
{
|
||||
testName: "no device mount path",
|
||||
|
@ -533,7 +533,7 @@ func TestAttacherMountDevice(t *testing.T) {
|
|||
if !tc.shouldFail {
|
||||
t.Errorf("test should not fail, but error occurred: %v", err)
|
||||
}
|
||||
return
|
||||
continue
|
||||
}
|
||||
if err == nil && tc.shouldFail {
|
||||
t.Errorf("test should fail, but no error occurred")
|
||||
|
|
Loading…
Reference in New Issue