storj/testsuite/ui/uitest/multinode.go
Egon Elbre dfd2977a01 testsuite/ui: fixes to setup
* Remove "enable-logging", because it ends up spawning consoles on
  Windows.
* Remove "disable-gpu", if we have a GPU, then let's use it.
* Create custom client, so we can attach logging to CDP.
* Ignore potential context.Canceled.
* Fix onboarding wizard test for new objects browser.
* Return an error on a context cancellation.
* Wire all loggers to planet.

Change-Id: I67eb138ba31252f55ac5b383679d033bcf71f1b2
2021-11-15 15:56:35 +02:00

35 lines
897 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
}
},
},
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)
})
})
}