mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
test: update the definition of testRunner and clusterTestCases
Signed-off-by: Benjamin Wang <wachao@vmware.com>
This commit is contained in:
parent
fc23d0e83a
commit
86e71f026e
@ -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)
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user