storj/testsuite/ui/uitest/multinode.go
Egon Elbre 1fd14e291f testsuite/ui/uitest: fixes for uitest
Enable leakless for killing processes. Maybe it'll prevent issues with
the jenkins stage stalling.

Unify some of the code.

Set the browser tests non-parallel again, it might be causing some of
the issues.

Change-Id: Idb123bff3640e8adab5db0917ee774f0cf7e2568
2021-11-23 15:22:53 +00:00

36 lines
931 B
Go

// Copyright (C) 2021 Storj Labs, Inc.
// See LICENSE for copying information.
package uitest
import (
"os"
"testing"
"github.com/go-rod/rod"
"storj.io/common/testcontext"
"storj.io/storj/multinode"
"storj.io/storj/private/testplanet"
)
// Multinode starts a new UI test with multinode instance(s).
func Multinode(t *testing.T, multinodeCount int, test Test) {
testplanet.Run(t, testplanet.Config{
SatelliteCount: 1, StorageNodeCount: 4, MultinodeCount: multinodeCount,
Reconfigure: testplanet.Reconfigure{
Multinode: func(index int, config *multinode.Config) {
if dir := os.Getenv("STORJ_TEST_MULTINODE_WEB"); dir != "" {
config.Console.StaticDir = dir
}
},
Satellite: configureSatellite,
},
NonParallel: true,
}, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet) {
Browser(t, ctx, planet, func(browser *rod.Browser) {
test(t, ctx, planet, browser)
})
})
}