Merge pull request #28990 from xiangpengzhao/fix_duplicated_code

Automatic merge from submit-queue

Delete duplicated code

The code block below is called twice sequentially in func `doTestPlugin`.
.
```go
 	if _, err := os.Stat(path); err != nil {
 		if os.IsNotExist(err) {
 			t.Errorf("SetUp() failed, volume path not created: %s", path)
 		} else {
 			t.Errorf("SetUp() failed: %v", err)
 		}
 	}
```
This commit is contained in:
k8s-merge-robot 2016-07-15 19:30:34 -07:00 committed by GitHub
commit 5e1b75d164

View File

@ -127,13 +127,6 @@ func doTestPlugin(t *testing.T, spec *volume.Spec) {
t.Errorf("SetUp() failed: %v", err)
}
}
if _, err := os.Stat(path); err != nil {
if os.IsNotExist(err) {
t.Errorf("SetUp() failed, volume path not created: %s", path)
} else {
t.Errorf("SetUp() failed: %v", err)
}
}
unmounter, err := plug.(*rbdPlugin).newUnmounterInternal("vol1", types.UID("poduid"), fdm, &mount.FakeMounter{})
if err != nil {