From ad8a782a821e8e4e0336f63694c0878df0b1c025 Mon Sep 17 00:00:00 2001 From: Anton Evangelatov Date: Mon, 19 Nov 2018 12:31:49 +0100 Subject: [PATCH] cmd/swarm: move initCluster to run_test.go --- cmd/swarm/access_test.go | 12 ------------ cmd/swarm/run_test.go | 11 +++++++++++ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/cmd/swarm/access_test.go b/cmd/swarm/access_test.go index 499af68c6a..38f1fae614 100644 --- a/cmd/swarm/access_test.go +++ b/cmd/swarm/access_test.go @@ -30,7 +30,6 @@ import ( "os" "runtime" "strings" - "sync" "testing" "time" @@ -50,17 +49,6 @@ const ( var DefaultCurve = crypto.S256() -const clusterSize = 3 - -var clusteronce sync.Once -var cluster *testCluster - -func initCluster(t *testing.T) { - clusteronce.Do(func() { - cluster = newTestCluster(t, clusterSize) - }) -} - func TestACT(t *testing.T) { if runtime.GOOS == "windows" { t.Skip() diff --git a/cmd/swarm/run_test.go b/cmd/swarm/run_test.go index 416fa7a503..680d238d06 100644 --- a/cmd/swarm/run_test.go +++ b/cmd/swarm/run_test.go @@ -57,6 +57,17 @@ func init() { }) } +const clusterSize = 3 + +var clusteronce sync.Once +var cluster *testCluster + +func initCluster(t *testing.T) { + clusteronce.Do(func() { + cluster = newTestCluster(t, clusterSize) + }) +} + func serverFunc(api *api.API) swarmhttp.TestServer { return swarmhttp.NewServer(api, "") }