diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index 3b83de794..612609283 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -2,8 +2,10 @@ package config import ( "bytes" + "fmt" "io" "os" + "runtime" "sort" "strings" @@ -509,6 +511,9 @@ image_copy_tmp_dir="storage"` It("Test Capabilities call", func() { // Given + if runtime.GOOS != "linux" { + Skip(fmt.Sprintf("capabilities not supported on %s", runtime.GOOS)) + } // When config, err := NewConfig("") // Then diff --git a/pkg/config/default.go b/pkg/config/default.go index b7aa5f292..127920997 100644 --- a/pkg/config/default.go +++ b/pkg/config/default.go @@ -32,8 +32,6 @@ const ( ) var ( - // DefaultInitPath is the default path to the container-init binary. - DefaultInitPath = "/usr/libexec/podman/catatonit" // DefaultInfraImage is the default image to run as infrastructure containers in pods. DefaultInfraImage = "" // DefaultRootlessSHMLockPath is the default path for rootless SHM locks. diff --git a/pkg/config/default_common.go b/pkg/config/default_common.go new file mode 100644 index 000000000..f65461043 --- /dev/null +++ b/pkg/config/default_common.go @@ -0,0 +1,7 @@ +//go:build !freebsd +// +build !freebsd + +package config + +// DefaultInitPath is the default path to the container-init binary. +var DefaultInitPath = "/usr/libexec/podman/catatonit" diff --git a/pkg/config/default_freebsd.go b/pkg/config/default_freebsd.go index f3c999bed..637abf981 100644 --- a/pkg/config/default_freebsd.go +++ b/pkg/config/default_freebsd.go @@ -1,5 +1,8 @@ package config +// DefaultInitPath is the default path to the container-init binary. +var DefaultInitPath = "/usr/local/libexec/podman/catatonit" + func getDefaultCgroupsMode() string { return "enabled" }