mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
tests/e2e: rename to "snapshotCount"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
2847232096
commit
31094e5616
@ -108,7 +108,7 @@ type etcdProcessClusterConfig struct {
|
|||||||
|
|
||||||
metricsURLScheme string
|
metricsURLScheme string
|
||||||
|
|
||||||
snapCount int // default is 10000
|
snapshotCount int // default is 10000
|
||||||
|
|
||||||
clientTLS clientConnType
|
clientTLS clientConnType
|
||||||
clientCertAuthEnabled bool
|
clientCertAuthEnabled bool
|
||||||
@ -175,8 +175,8 @@ func (cfg *etcdProcessClusterConfig) etcdServerProcessConfigs() []*etcdServerPro
|
|||||||
if cfg.execPath == "" {
|
if cfg.execPath == "" {
|
||||||
cfg.execPath = binPath
|
cfg.execPath = binPath
|
||||||
}
|
}
|
||||||
if cfg.snapCount == 0 {
|
if cfg.snapshotCount == 0 {
|
||||||
cfg.snapCount = etcdserver.DefaultSnapshotCount
|
cfg.snapshotCount = etcdserver.DefaultSnapshotCount
|
||||||
}
|
}
|
||||||
|
|
||||||
etcdCfgs := make([]*etcdServerProcessConfig, cfg.clusterSize)
|
etcdCfgs := make([]*etcdServerProcessConfig, cfg.clusterSize)
|
||||||
@ -217,7 +217,7 @@ func (cfg *etcdProcessClusterConfig) etcdServerProcessConfigs() []*etcdServerPro
|
|||||||
"--initial-advertise-peer-urls", purl.String(),
|
"--initial-advertise-peer-urls", purl.String(),
|
||||||
"--initial-cluster-token", cfg.initialToken,
|
"--initial-cluster-token", cfg.initialToken,
|
||||||
"--data-dir", dataDirPath,
|
"--data-dir", dataDirPath,
|
||||||
"--snapshot-count", fmt.Sprintf("%d", cfg.snapCount),
|
"--snapshot-count", fmt.Sprintf("%d", cfg.snapshotCount),
|
||||||
}
|
}
|
||||||
args = addV2Args(args)
|
args = addV2Args(args)
|
||||||
if cfg.forceNewCluster {
|
if cfg.forceNewCluster {
|
||||||
|
@ -242,7 +242,7 @@ func testCtlV2Backup(t *testing.T, snapCount int, v3 bool) {
|
|||||||
defer os.RemoveAll(backupDir)
|
defer os.RemoveAll(backupDir)
|
||||||
|
|
||||||
etcdCfg := configNoTLS
|
etcdCfg := configNoTLS
|
||||||
etcdCfg.snapCount = snapCount
|
etcdCfg.snapshotCount = snapCount
|
||||||
epc1 := setupEtcdctlTest(t, &etcdCfg, false)
|
epc1 := setupEtcdctlTest(t, &etcdCfg, false)
|
||||||
|
|
||||||
// v3 put before v2 set so snapshot happens after v3 operations to confirm
|
// v3 put before v2 set so snapshot happens after v3 operations to confirm
|
||||||
|
@ -39,7 +39,7 @@ func TestEtcdCorruptHash(t *testing.T) {
|
|||||||
cfg := configNoTLS
|
cfg := configNoTLS
|
||||||
|
|
||||||
// trigger snapshot so that restart member can load peers from disk
|
// trigger snapshot so that restart member can load peers from disk
|
||||||
cfg.snapCount = 3
|
cfg.snapshotCount = 3
|
||||||
|
|
||||||
testCtl(t, corruptTest, withQuorum(),
|
testCtl(t, corruptTest, withQuorum(),
|
||||||
withCfg(cfg),
|
withCfg(cfg),
|
||||||
|
@ -38,7 +38,7 @@ func TestReleaseUpgrade(t *testing.T) {
|
|||||||
|
|
||||||
copiedCfg := configNoTLS
|
copiedCfg := configNoTLS
|
||||||
copiedCfg.execPath = lastReleaseBinary
|
copiedCfg.execPath = lastReleaseBinary
|
||||||
copiedCfg.snapCount = 3
|
copiedCfg.snapshotCount = 3
|
||||||
copiedCfg.baseScheme = "unix" // to avoid port conflict
|
copiedCfg.baseScheme = "unix" // to avoid port conflict
|
||||||
|
|
||||||
epc, err := newEtcdProcessCluster(&copiedCfg)
|
epc, err := newEtcdProcessCluster(&copiedCfg)
|
||||||
@ -113,7 +113,7 @@ func TestReleaseUpgradeWithRestart(t *testing.T) {
|
|||||||
|
|
||||||
copiedCfg := configNoTLS
|
copiedCfg := configNoTLS
|
||||||
copiedCfg.execPath = lastReleaseBinary
|
copiedCfg.execPath = lastReleaseBinary
|
||||||
copiedCfg.snapCount = 10
|
copiedCfg.snapshotCount = 10
|
||||||
copiedCfg.baseScheme = "unix"
|
copiedCfg.baseScheme = "unix"
|
||||||
|
|
||||||
epc, err := newEtcdProcessCluster(&copiedCfg)
|
epc, err := newEtcdProcessCluster(&copiedCfg)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user