mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Cleanup some e2e test configurations
Notes: 1. compactPhysical in ctlCtx and withQuota aren't used at all, they are dead code. 2. quotaBackendBytes in ctlCtx isn't used either. Instead, users (test cases) set the QuotaBackendBytes directly. Signed-off-by: Benjamin Wang <wachao@vmware.com>
This commit is contained in:
parent
e40828540c
commit
17b83ea810
@ -121,12 +121,11 @@ func dialWithSchemeTest(cx ctlCtx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ctlCtx struct {
|
type ctlCtx struct {
|
||||||
t *testing.T
|
t *testing.T
|
||||||
apiPrefix string
|
apiPrefix string
|
||||||
cfg e2e.EtcdProcessClusterConfig
|
cfg e2e.EtcdProcessClusterConfig
|
||||||
quotaBackendBytes int64
|
corruptFunc func(string) error
|
||||||
corruptFunc func(string) error
|
noStrictReconfig bool
|
||||||
noStrictReconfig bool
|
|
||||||
|
|
||||||
epc *e2e.EtcdProcessCluster
|
epc *e2e.EtcdProcessCluster
|
||||||
|
|
||||||
@ -143,9 +142,6 @@ type ctlCtx struct {
|
|||||||
|
|
||||||
initialCorruptCheck bool
|
initialCorruptCheck bool
|
||||||
|
|
||||||
// for compaction
|
|
||||||
compactPhysical bool
|
|
||||||
|
|
||||||
// dir that was used during the test
|
// dir that was used during the test
|
||||||
dataDir string
|
dataDir string
|
||||||
}
|
}
|
||||||
@ -156,6 +152,7 @@ func (cx *ctlCtx) applyOpts(opts []ctlOption) {
|
|||||||
for _, opt := range opts {
|
for _, opt := range opts {
|
||||||
opt(cx)
|
opt(cx)
|
||||||
}
|
}
|
||||||
|
|
||||||
cx.initialCorruptCheck = true
|
cx.initialCorruptCheck = true
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,10 +176,6 @@ func withInteractive() ctlOption {
|
|||||||
return func(cx *ctlCtx) { cx.interactive = true }
|
return func(cx *ctlCtx) { cx.interactive = true }
|
||||||
}
|
}
|
||||||
|
|
||||||
func withQuota(b int64) ctlOption {
|
|
||||||
return func(cx *ctlCtx) { cx.quotaBackendBytes = b }
|
|
||||||
}
|
|
||||||
|
|
||||||
func withInitialCorruptCheck() ctlOption {
|
func withInitialCorruptCheck() ctlOption {
|
||||||
return func(cx *ctlCtx) { cx.initialCorruptCheck = true }
|
return func(cx *ctlCtx) { cx.initialCorruptCheck = true }
|
||||||
}
|
}
|
||||||
@ -232,9 +225,6 @@ func testCtlWithOffline(t *testing.T, testFunc func(ctlCtx), testOfflineFunc fun
|
|||||||
if !ret.quorum {
|
if !ret.quorum {
|
||||||
ret.cfg = *e2e.ConfigStandalone(ret.cfg)
|
ret.cfg = *e2e.ConfigStandalone(ret.cfg)
|
||||||
}
|
}
|
||||||
if ret.quotaBackendBytes > 0 {
|
|
||||||
ret.cfg.QuotaBackendBytes = ret.quotaBackendBytes
|
|
||||||
}
|
|
||||||
ret.cfg.NoStrictReconfig = ret.noStrictReconfig
|
ret.cfg.NoStrictReconfig = ret.noStrictReconfig
|
||||||
if ret.initialCorruptCheck {
|
if ret.initialCorruptCheck {
|
||||||
ret.cfg.InitialCorruptCheck = ret.initialCorruptCheck
|
ret.cfg.InitialCorruptCheck = ret.initialCorruptCheck
|
||||||
|
Loading…
x
Reference in New Issue
Block a user