Skip to content

Commit

Permalink
Merge pull request kubernetes#101536 from jingxu97/apr/mounttest
Browse files Browse the repository at this point in the history
Add unit test for clean up mountpoint logic if path does not exist
  • Loading branch information
k8s-ci-robot authored May 25, 2021
2 parents 13cafd5 + bdcc7ac commit 0dcf9c0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions staging/src/k8s.io/mount-utils/mount_helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0dcf9c0

Please sign in to comment.