diff --git a/builder/azure/chroot/step_mount_device_test.go b/builder/azure/chroot/step_mount_device_test.go index 41c44f049..98ed49bc7 100644 --- a/builder/azure/chroot/step_mount_device_test.go +++ b/builder/azure/chroot/step_mount_device_test.go @@ -1,5 +1,3 @@ -//+build linux,freebsd - package chroot import ( @@ -16,6 +14,12 @@ import ( ) func TestStepMountDevice_Run(t *testing.T) { + switch runtime.GOOS { + case "linux", "freebsd": + break + default: + t.Skip("Unsupported operating system") + } mountPath, err := ioutil.TempDir("", "stepmountdevicetest") if err != nil { t.Errorf("Unable to create a temporary directory: %q", err)