Browse Source

e2e: support --strict-reconfig-check=false

Anthony Romano 9 years ago
parent
commit
aa9837e8ff
3 changed files with 14 additions and 2 deletions
  1. 4 2
      e2e/ctl_v3_member_test.go
  2. 6 0
      e2e/ctl_v3_test.go
  3. 4 0
      e2e/etcd_test.go

+ 4 - 2
e2e/ctl_v3_member_test.go

@@ -24,8 +24,10 @@ import (
 	"github.com/coreos/etcd/etcdserver/etcdserverpb"
 )
 
-func TestCtlV3MemberList(t *testing.T)   { testCtl(t, memberListTest) }
-func TestCtlV3MemberRemove(t *testing.T) { testCtl(t, memberRemoveTest, withQuorum()) }
+func TestCtlV3MemberList(t *testing.T) { testCtl(t, memberListTest) }
+func TestCtlV3MemberRemove(t *testing.T) {
+	testCtl(t, memberRemoveTest, withQuorum(), withNoStrictReconfig())
+}
 func TestCtlV3MemberAdd(t *testing.T)    { testCtl(t, memberAddTest) }
 func TestCtlV3MemberUpdate(t *testing.T) { testCtl(t, memberUpdateTest) }
 

+ 6 - 0
e2e/ctl_v3_test.go

@@ -41,6 +41,7 @@ type ctlCtx struct {
 	t                 *testing.T
 	cfg               etcdProcessClusterConfig
 	quotaBackendBytes int64
+	noStrictReconfig  bool
 
 	epc *etcdProcessCluster
 
@@ -88,6 +89,10 @@ func withCompactPhysical() ctlOption {
 	return func(cx *ctlCtx) { cx.compactPhysical = true }
 }
 
+func withNoStrictReconfig() ctlOption {
+	return func(cx *ctlCtx) { cx.noStrictReconfig = true }
+}
+
 func testCtl(t *testing.T, testFunc func(ctlCtx), opts ...ctlOption) {
 	defer testutil.AfterTest(t)
 
@@ -106,6 +111,7 @@ func testCtl(t *testing.T, testFunc func(ctlCtx), opts ...ctlOption) {
 	if ret.quotaBackendBytes > 0 {
 		ret.cfg.quotaBackendBytes = ret.quotaBackendBytes
 	}
+	ret.cfg.noStrictReconfig = ret.noStrictReconfig
 
 	epc, err := newEtcdProcessCluster(&ret.cfg)
 	if err != nil {

+ 4 - 0
e2e/etcd_test.go

@@ -165,6 +165,7 @@ type etcdProcessClusterConfig struct {
 	forceNewCluster       bool
 	initialToken          string
 	quotaBackendBytes     int64
+	noStrictReconfig      bool
 }
 
 // newEtcdProcessCluster launches a new cluster from etcd processes, returning
@@ -285,6 +286,9 @@ func (cfg *etcdProcessClusterConfig) etcdProcessConfigs() []*etcdProcessConfig {
 				"--quota-backend-bytes", fmt.Sprintf("%d", cfg.quotaBackendBytes),
 			)
 		}
+		if cfg.noStrictReconfig {
+			args = append(args, "--strict-reconfig-check=false")
+		}
 
 		args = append(args, cfg.tlsArgs()...)
 		etcdCfgs[i] = &etcdProcessConfig{