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
commit 0dcf9c0826
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)