private/testplanet: add option to run testplanet databases non-parallel

NonParallel running is needed for gateway tests, because minio
unfortunately relies on global state.

Change-Id: If730db2ab86d10f4d02e1ac3128f758e9c18cdff
This commit is contained in:
Egon Elbre 2020-02-27 15:31:05 +02:00
parent fb2711d05e
commit 1f7c3be8f9
2 changed files with 6 additions and 2 deletions

View File

@ -52,7 +52,8 @@ type Config struct {
IdentityVersion *storj.IDVersion
Reconfigure Reconfigure
Name string
Name string
NonParallel bool
}
// Planet is a full storj system setup.

View File

@ -20,7 +20,10 @@ func Run(t *testing.T, config Config, test func(t *testing.T, ctx *testcontext.C
for _, satelliteDB := range satellitedbtest.Databases() {
satelliteDB := satelliteDB
t.Run(satelliteDB.MasterDB.Name, func(t *testing.T) {
t.Parallel()
parallel := !config.NonParallel
if parallel {
t.Parallel()
}
ctx := testcontext.New(t)
defer ctx.Cleanup()