...
1
16
17 package flexvolume
18
19 import (
20 "testing"
21
22 "k8s.io/mount-utils"
23
24 "k8s.io/apimachinery/pkg/types"
25 "k8s.io/kubernetes/test/utils/harness"
26 )
27
28 func TestTearDownAt(tt *testing.T) {
29 t := harness.For(tt)
30 defer t.Close()
31
32 mounter := mount.NewFakeMounter(nil)
33
34 plugin, rootDir := testPlugin(t)
35 plugin.runner = fakeRunner(
36 assertDriverCall(t, notSupportedOutput(), unmountCmd,
37 rootDir+"/mount-dir"),
38 )
39
40 u, _ := plugin.newUnmounterInternal("volName", types.UID("poduid"), mounter, plugin.runner)
41 u.TearDownAt(rootDir + "/mount-dir")
42 }
43
View as plain text