diff --git a/pkg/util/mount/mount_unsupported.go b/pkg/util/mount/mount_unsupported.go index 244c22c04c..87d1e37481 100644 --- a/pkg/util/mount/mount_unsupported.go +++ b/pkg/util/mount/mount_unsupported.go @@ -86,7 +86,7 @@ func (mounter *Mounter) MakeRShared(path string) error { } func (mounter *SafeFormatAndMount) formatAndMount(source string, target string, fstype string, options []string) error { - return nil + return mounter.Interface.Mount(source, target, fstype, options) } func (mounter *SafeFormatAndMount) diskLooksUnformatted(disk string) (bool, error) { diff --git a/pkg/volume/rbd/rbd_test.go b/pkg/volume/rbd/rbd_test.go index 67fe5b702f..a35a1a4e74 100644 --- a/pkg/volume/rbd/rbd_test.go +++ b/pkg/volume/rbd/rbd_test.go @@ -19,6 +19,7 @@ package rbd import ( "fmt" "os" + "path/filepath" "reflect" "strings" "sync" @@ -149,7 +150,7 @@ func checkMounterLog(t *testing.T, fakeMounter *mount.FakeMounter, expected int, lastIndex := len(fakeMounter.Log) - 1 lastAction := fakeMounter.Log[lastIndex] if !reflect.DeepEqual(expectedAction, lastAction) { - t.Fatalf("fakeMounter.Log[%d] should be %v, not: %v", lastIndex, expectedAction, lastAction) + t.Fatalf("fakeMounter.Log[%d] should be %#v, not: %#v", lastIndex, expectedAction, lastAction) } } @@ -276,6 +277,10 @@ func TestPlugin(t *testing.T) { t.Fatalf("error creating temp dir: %v", err) } defer os.RemoveAll(tmpDir) + tmpDir, err = filepath.EvalSymlinks(tmpDir) + if err != nil { + t.Fatal(err) + } podUID := uuid.NewUUID() var cases []*testcase