diff --git a/tests/e2e/ctl_v3_lease_test.go b/tests/e2e/ctl_v3_lease_test.go index 6ac44c44f240..4b866652880e 100644 --- a/tests/e2e/ctl_v3_lease_test.go +++ b/tests/e2e/ctl_v3_lease_test.go @@ -23,13 +23,21 @@ import ( "go.etcd.io/etcd/tests/v3/framework/e2e" ) -func TestCtlV3LeaseKeepAlive(t *testing.T) { testCtl(t, leaseTestKeepAlive) } +func TestCtlV3LeaseKeepAlive(t *testing.T) { + testCtl(t, leaseTestKeepAlive) +} +func TestCtlV3LeaseKeepAliveWithLeaseV2Renew(t *testing.T) { + testCtl(t, leaseTestKeepAlive, withLeaseV2Renew()) +} func TestCtlV3LeaseKeepAliveNoTLS(t *testing.T) { testCtl(t, leaseTestKeepAlive, withCfg(*e2e.NewConfigNoTLS())) } func TestCtlV3LeaseKeepAliveClientTLS(t *testing.T) { testCtl(t, leaseTestKeepAlive, withCfg(*e2e.NewConfigClientTLS())) } +func TestCtlV3LeaseKeepAliveClientTLSWithLeaseV2Renew(t *testing.T) { + testCtl(t, leaseTestKeepAlive, withCfg(*e2e.NewConfigClientTLS()), withLeaseV2Renew()) +} func TestCtlV3LeaseKeepAliveClientAutoTLS(t *testing.T) { testCtl(t, leaseTestKeepAlive, withCfg(*e2e.NewConfigClientAutoTLS())) } diff --git a/tests/e2e/ctl_v3_test.go b/tests/e2e/ctl_v3_test.go index 8b11cf6b5168..c458c45eb445 100644 --- a/tests/e2e/ctl_v3_test.go +++ b/tests/e2e/ctl_v3_test.go @@ -142,6 +142,8 @@ type ctlCtx struct { initialCorruptCheck bool + enableLeaseV2Renew bool + // for compaction compactPhysical bool @@ -182,6 +184,10 @@ func withInitialCorruptCheck() ctlOption { return func(cx *ctlCtx) { cx.initialCorruptCheck = true } } +func withLeaseV2Renew() ctlOption { + return func(cx *ctlCtx) { cx.enableLeaseV2Renew = true } +} + func withCorruptFunc(f func(string) error) ctlOption { return func(cx *ctlCtx) { cx.corruptFunc = f } } @@ -226,6 +232,9 @@ func testCtlWithOffline(t *testing.T, testFunc func(ctlCtx), testOfflineFunc fun if ret.initialCorruptCheck { ret.cfg.InitialCorruptCheck = ret.initialCorruptCheck } + if ret.enableLeaseV2Renew { + ret.cfg.EnableLeaseV2Renew = ret.enableLeaseV2Renew + } if testOfflineFunc != nil { ret.cfg.KeepDataDir = true } diff --git a/tests/framework/e2e/cluster.go b/tests/framework/e2e/cluster.go index 4b1daf93d784..7546a39e3be0 100644 --- a/tests/framework/e2e/cluster.go +++ b/tests/framework/e2e/cluster.go @@ -166,6 +166,7 @@ type EtcdProcessClusterConfig struct { NoStrictReconfig bool EnableV2 bool InitialCorruptCheck bool + EnableLeaseV2Renew bool AuthTokenOpts string V2deprecation string @@ -314,6 +315,9 @@ func (cfg *EtcdProcessClusterConfig) EtcdServerProcessConfigs(tb testing.TB) []* if cfg.InitialCorruptCheck { args = append(args, "--experimental-initial-corrupt-check") } + if cfg.EnableLeaseV2Renew { + args = append(args, "--experimental-enable-lease-v2-renew") + } var murl string if cfg.MetricsURLScheme != "" { murl = (&url.URL{