From b87daf6d697655ca092bf54717a64b07504a13c1 Mon Sep 17 00:00:00 2001 From: Peter Bourgon Date: Wed, 30 Jul 2014 15:35:42 +0200 Subject: [PATCH 1/2] Only import "testing" from *_test.go This prevents the testing package flags from leaking into the flagsets of binaries that import docker. I left integration-cli alone. Docker-DCO-1.1-Signed-off-by: Peter Bourgon (github: peterbourgon) --- daemon/graphdriver/graphtest/{graphtest.go => graph_test.go} | 0 pkg/mount/{mountinfo_test_linux.go => mountinfo_linux_test.go} | 2 ++ pkg/testutils/{testutils.go => utils_test.go} | 0 3 files changed, 2 insertions(+) rename daemon/graphdriver/graphtest/{graphtest.go => graph_test.go} (100%) rename pkg/mount/{mountinfo_test_linux.go => mountinfo_linux_test.go} (99%) rename pkg/testutils/{testutils.go => utils_test.go} (100%) diff --git a/daemon/graphdriver/graphtest/graphtest.go b/daemon/graphdriver/graphtest/graph_test.go similarity index 100% rename from daemon/graphdriver/graphtest/graphtest.go rename to daemon/graphdriver/graphtest/graph_test.go diff --git a/pkg/mount/mountinfo_test_linux.go b/pkg/mount/mountinfo_linux_test.go similarity index 99% rename from pkg/mount/mountinfo_test_linux.go rename to pkg/mount/mountinfo_linux_test.go index f2e3daa8b3..07ef7e0225 100644 --- a/pkg/mount/mountinfo_test_linux.go +++ b/pkg/mount/mountinfo_linux_test.go @@ -1,3 +1,5 @@ +// +build linux + package mount import ( diff --git a/pkg/testutils/testutils.go b/pkg/testutils/utils_test.go similarity index 100% rename from pkg/testutils/testutils.go rename to pkg/testutils/utils_test.go From b386bce1f1bc92584282cc3f6656878c05d75272 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Thu, 7 Aug 2014 14:24:37 -0700 Subject: [PATCH 2/2] Graphtest is ok to compile normally The graphtest package is only imported in the test files of other packages therefore we do not leak testing flags. Signed-off-by: Michael Crosby --- daemon/graphdriver/graphtest/{graph_test.go => graphtest.go} | 0 pkg/testutils/{utils_test.go => utils.go} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename daemon/graphdriver/graphtest/{graph_test.go => graphtest.go} (100%) rename pkg/testutils/{utils_test.go => utils.go} (100%) diff --git a/daemon/graphdriver/graphtest/graph_test.go b/daemon/graphdriver/graphtest/graphtest.go similarity index 100% rename from daemon/graphdriver/graphtest/graph_test.go rename to daemon/graphdriver/graphtest/graphtest.go diff --git a/pkg/testutils/utils_test.go b/pkg/testutils/utils.go similarity index 100% rename from pkg/testutils/utils_test.go rename to pkg/testutils/utils.go