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
Kubernetes Submit Queue 2018-04-24 14:22:10 -07:00 committed by GitHub
commit b692b7159a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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")