Update detach logic for block volume if devicePath is empty

This commit is contained in:
mtanino
2017-12-13 11:31:38 -05:00
parent fceabcdb09
commit 1443b1bd1f
10 changed files with 266 additions and 65 deletions

View File

@@ -120,6 +120,15 @@ func (fake *fakeDiskManager) DetachDisk(c fcDiskUnmounter, mntPath string) error
return nil
}
func (fake *fakeDiskManager) DetachBlockFCDisk(c fcDiskUnmapper, mapPath, devicePath string) error {
err := os.RemoveAll(mapPath)
if err != nil {
return err
}
fake.detachCalled = true
return nil
}
func doTestPlugin(t *testing.T, spec *volume.Spec) {
tmpDir, err := utiltesting.MkTmpdir("fc_test")
if err != nil {