From 470980d4a86d61a9a81706a0f0468ee61c184a1a Mon Sep 17 00:00:00 2001 From: Ian Chakeres Date: Mon, 26 Mar 2018 12:33:33 -0700 Subject: [PATCH] Skip volume unit tests that don't work on osx. --- pkg/volume/fc/fc_test.go | 4 ++++ pkg/volume/rbd/rbd_test.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/pkg/volume/fc/fc_test.go b/pkg/volume/fc/fc_test.go index f8ee2650b56..80e3cd63923 100644 --- a/pkg/volume/fc/fc_test.go +++ b/pkg/volume/fc/fc_test.go @@ -19,6 +19,7 @@ package fc import ( "fmt" "os" + "runtime" "strconv" "strings" "testing" @@ -424,6 +425,9 @@ func Test_getWwnsLunWwidsError(t *testing.T) { } func Test_ConstructVolumeSpec(t *testing.T) { + if runtime.GOOS == "darwin" { + t.Skipf("Test_ConstructVolumeSpec is not supported on GOOS=%s", runtime.GOOS) + } fm := &mount.FakeMounter{ MountPoints: []mount.MountPoint{ {Device: "/dev/sdb", Path: "/var/lib/kubelet/pods/some-pod/volumes/kubernetes.io~fc/fc-in-pod1"}, diff --git a/pkg/volume/rbd/rbd_test.go b/pkg/volume/rbd/rbd_test.go index b644fe7576a..73a5aea9d98 100644 --- a/pkg/volume/rbd/rbd_test.go +++ b/pkg/volume/rbd/rbd_test.go @@ -21,6 +21,7 @@ import ( "os" "path/filepath" "reflect" + "runtime" "strings" "sync" "testing" @@ -532,6 +533,9 @@ func TestGetDeviceMountPath(t *testing.T) { // https://github.com/kubernetes/kubernetes/issues/57744 func TestConstructVolumeSpec(t *testing.T) { + if runtime.GOOS == "darwin" { + t.Skipf("TestConstructVolumeSpec is not supported on GOOS=%s", runtime.GOOS) + } tmpDir, err := utiltesting.MkTmpdir("rbd_test") if err != nil { t.Fatalf("error creating temp dir: %v", err)