cmd/swarm: move initCluster to run_test.go

This commit is contained in:
Anton Evangelatov 2018-11-19 12:31:49 +01:00
parent eb0c5cf630
commit ad8a782a82
2 changed files with 11 additions and 12 deletions

View file

@ -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()

View file

@ -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, "")
}