From 109b2a0ca9a5113787cb0e4fd7d6199d62b69c9e Mon Sep 17 00:00:00 2001 From: Brad Ackerman Date: Sun, 9 Aug 2020 14:12:58 -0700 Subject: [PATCH] Build constraints don't seem to work on test. --- builder/azure/chroot/step_mount_device_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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)