cmd/swarm: speed up tests - use global cluster (#18129)
This commit is contained in:
committed by
GitHub
parent
3333fe660f
commit
6b6c4d1c27
@ -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, "")
|
||||
}
|
||||
|
Reference in New Issue
Block a user