diff --git a/pkg/cri/server/container_create_test.go b/pkg/cri/server/container_create_test.go index 48e2ed0ab..151751b5f 100644 --- a/pkg/cri/server/container_create_test.go +++ b/pkg/cri/server/container_create_test.go @@ -69,8 +69,11 @@ func TestGeneralContainerSpec(t *testing.T) { } func TestPodAnnotationPassthroughContainerSpec(t *testing.T) { - if goruntime.GOOS == "darwin" { + switch goruntime.GOOS { + case "darwin": t.Skip("not implemented on Darwin") + case "freebsd": + t.Skip("not implemented on FreeBSD") } testID := "test-id" @@ -279,8 +282,11 @@ func TestVolumeMounts(t *testing.T) { } func TestContainerAnnotationPassthroughContainerSpec(t *testing.T) { - if goruntime.GOOS == "darwin" { + switch goruntime.GOOS { + case "darwin": t.Skip("not implemented on Darwin") + case "freebsd": + t.Skip("not implemented on FreeBSD") } testID := "test-id" diff --git a/pkg/cri/server/sandbox_run_test.go b/pkg/cri/server/sandbox_run_test.go index d8159aabb..91a197783 100644 --- a/pkg/cri/server/sandbox_run_test.go +++ b/pkg/cri/server/sandbox_run_test.go @@ -35,10 +35,12 @@ import ( ) func TestSandboxContainerSpec(t *testing.T) { - if goruntime.GOOS == "darwin" { + switch goruntime.GOOS { + case "darwin": t.Skip("not implemented on Darwin") + case "freebsd": + t.Skip("not implemented on FreeBSD") } - testID := "test-id" nsPath := "test-cni" for desc, test := range map[string]struct {