From d3890b4115302b3f6abd4d791a90c8959ea30942 Mon Sep 17 00:00:00 2001 From: David Calavera Date: Wed, 2 Sep 2015 18:44:55 +0200 Subject: [PATCH] Do not import testing in the main binary. Signed-off-by: David Calavera --- sandbox/namespace_windows.go | 7 ------- sandbox/sandbox_freebsd.go | 7 ------- sandbox/test_freebsd.go | 8 ++++++++ sandbox/test_windows.go | 8 ++++++++ 4 files changed, 16 insertions(+), 14 deletions(-) create mode 100644 sandbox/test_freebsd.go create mode 100644 sandbox/test_windows.go diff --git a/sandbox/namespace_windows.go b/sandbox/namespace_windows.go index 00d8679..5289328 100644 --- a/sandbox/namespace_windows.go +++ b/sandbox/namespace_windows.go @@ -1,7 +1,5 @@ package sandbox -import "testing" - // GenerateKey generates a sandbox key based on the passed // container id. func GenerateKey(containerID string) string { @@ -28,8 +26,3 @@ func GC() { func InitOSContext() func() { return func() {} } - -// SetupTestOSContext sets up a separate test OS context in which tests will be executed. -func SetupTestOSContext(t *testing.T) func() { - return func() {} -} diff --git a/sandbox/sandbox_freebsd.go b/sandbox/sandbox_freebsd.go index 00d8679..5289328 100644 --- a/sandbox/sandbox_freebsd.go +++ b/sandbox/sandbox_freebsd.go @@ -1,7 +1,5 @@ package sandbox -import "testing" - // GenerateKey generates a sandbox key based on the passed // container id. func GenerateKey(containerID string) string { @@ -28,8 +26,3 @@ func GC() { func InitOSContext() func() { return func() {} } - -// SetupTestOSContext sets up a separate test OS context in which tests will be executed. -func SetupTestOSContext(t *testing.T) func() { - return func() {} -} diff --git a/sandbox/test_freebsd.go b/sandbox/test_freebsd.go new file mode 100644 index 0000000..80af79f --- /dev/null +++ b/sandbox/test_freebsd.go @@ -0,0 +1,8 @@ +package sandbox + +import "testing" + +// SetupTestOSContext sets up a separate test OS context in which tests will be executed. +func SetupTestOSContext(t *testing.T) func() { + return func() {} +} diff --git a/sandbox/test_windows.go b/sandbox/test_windows.go new file mode 100644 index 0000000..80af79f --- /dev/null +++ b/sandbox/test_windows.go @@ -0,0 +1,8 @@ +package sandbox + +import "testing" + +// SetupTestOSContext sets up a separate test OS context in which tests will be executed. +func SetupTestOSContext(t *testing.T) func() { + return func() {} +}