mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Add unit test for clean up mountpoint logic if path does not exist
Add the unit test case for path does not exist when cleanup mountpoint Change-Id: I4aa3599e62bde59513764421a146c502421014ed
This commit is contained in:
parent
fbc93bd34c
commit
bdcc7ac2fd
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user