cri/server: Disable tests on FreeBSD

The TestPodAnnotationPassthroughContainerSpec test and the
TestContainerAnnotationPassthroughContainerSpec test both depend on a
platform-specific implementation of criService.containerSpec, which is
unimplemented on FreeBSD.

The TestSandboxContainerSpec depends on a platform-specific
implementation oc criService.sandboxContainerSpec, which is
unimplemented on FreeBSD.

Signed-off-by: Samuel Karp <me@samuelkarp.com>
This commit is contained in:
Samuel Karp 2022-06-08 22:40:45 -07:00
parent ad8e598060
commit 42e019e634
No known key found for this signature in database
GPG Key ID: AAA3FE8A831FC087
2 changed files with 12 additions and 4 deletions

View File

@ -69,8 +69,11 @@ func TestGeneralContainerSpec(t *testing.T) {
} }
func TestPodAnnotationPassthroughContainerSpec(t *testing.T) { func TestPodAnnotationPassthroughContainerSpec(t *testing.T) {
if goruntime.GOOS == "darwin" { switch goruntime.GOOS {
case "darwin":
t.Skip("not implemented on Darwin") t.Skip("not implemented on Darwin")
case "freebsd":
t.Skip("not implemented on FreeBSD")
} }
testID := "test-id" testID := "test-id"
@ -279,8 +282,11 @@ func TestVolumeMounts(t *testing.T) {
} }
func TestContainerAnnotationPassthroughContainerSpec(t *testing.T) { func TestContainerAnnotationPassthroughContainerSpec(t *testing.T) {
if goruntime.GOOS == "darwin" { switch goruntime.GOOS {
case "darwin":
t.Skip("not implemented on Darwin") t.Skip("not implemented on Darwin")
case "freebsd":
t.Skip("not implemented on FreeBSD")
} }
testID := "test-id" testID := "test-id"

View File

@ -35,10 +35,12 @@ import (
) )
func TestSandboxContainerSpec(t *testing.T) { func TestSandboxContainerSpec(t *testing.T) {
if goruntime.GOOS == "darwin" { switch goruntime.GOOS {
case "darwin":
t.Skip("not implemented on Darwin") t.Skip("not implemented on Darwin")
case "freebsd":
t.Skip("not implemented on FreeBSD")
} }
testID := "test-id" testID := "test-id"
nsPath := "test-cni" nsPath := "test-cni"
for desc, test := range map[string]struct { for desc, test := range map[string]struct {