diff options
Diffstat (limited to 'cmd/swarm/run_test.go')
-rw-r--r-- | cmd/swarm/run_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cmd/swarm/run_test.go b/cmd/swarm/run_test.go index 416fa7a50..680d238d0 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, "") } |