mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
8f1b2a0fd3
testutil/daemon uses a generic unix implementation that assumes that the host OS supports cgroups & network namespaces, which is not the case for FreeBSD. This change adds a FreeBSD-specific implementation for `testutil/daemon`, namely for `cleanupNetworkNamespace` and `CgroupNamespace` functions. Signed-off-by: Artem Khramov <akhramov@pm.me>
18 lines
432 B
Go
18 lines
432 B
Go
//go:build freebsd
|
|
// +build freebsd
|
|
|
|
package daemon // import "github.com/docker/docker/testutil/daemon"
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"gotest.tools/v3/assert"
|
|
)
|
|
|
|
func cleanupNetworkNamespace(_ testing.TB, _ *Daemon) {}
|
|
|
|
// CgroupNamespace returns the cgroup namespace the daemon is running in
|
|
func (d *Daemon) CgroupNamespace(t testing.TB) string {
|
|
assert.Assert(t, false, "cgroup namespaces are not supported on FreeBSD")
|
|
return ""
|
|
}
|