Merge pull request #101536 from jingxu97/apr/mounttest

Add unit test for clean up mountpoint logic if path does not exist
This commit is contained in:
Kubernetes Prow Robot
2021-05-24 21:49:13 -07:00
committed by GitHub

View File

@@ -53,6 +53,12 @@ func TestDoCleanupMountPoint(t *testing.T) {
return MountPoint{Device: "/dev/sdb", Path: path}, nil, nil
},
},
"path-not-exist": {
prepare: func(base string) (MountPoint, error, error) {
path := filepath.Join(base, testMount)
return MountPoint{Device: "/dev/sdb", Path: path}, nil, nil
},
},
"mount-corrupted": {
prepare: func(base string) (MountPoint, error, error) {
path := filepath.Join(base, testMount)