test: update the definition of testRunner and clusterTestCases

Signed-off-by: Benjamin Wang <wachao@vmware.com>
This commit is contained in:
Benjamin Wang 2022-11-07 10:15:21 +08:00
parent fc23d0e83a
commit 86e71f026e
3 changed files with 10 additions and 4 deletions

View File

@ -15,14 +15,16 @@
package common
import (
"go.etcd.io/etcd/tests/v3/framework"
"testing"
"go.etcd.io/etcd/tests/v3/framework/config"
intf "go.etcd.io/etcd/tests/v3/framework/interfaces"
)
var testRunner = framework.UnitTestRunner
var clusterTestCases = func() []testCase { return nil }
var (
testRunner intf.TestRunner
clusterTestCases func() []testCase
)
func TestMain(m *testing.M) {
testRunner.TestMain(m)

View File

@ -23,6 +23,11 @@ import (
func init() {
testRunner = framework.UnitTestRunner
clusterTestCases = unitClusterTestCases
}
func unitClusterTestCases() []testCase {
return nil
}
// When a build tag (e.g. e2e or integration) isn't configured in IDE,

View File

@ -50,7 +50,6 @@ func (e integrationRunner) BeforeTest(t testing.TB) {
func (e integrationRunner) NewCluster(ctx context.Context, t testing.TB, opts ...config.ClusterOption) intf.Cluster {
var err error
cfg := config.NewClusterConfig(opts...)
integrationCfg := ClusterConfig{
Size: cfg.ClusterSize,
QuotaBackendBytes: cfg.QuotaBackendBytes,