mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
refactor change cmd argument snapCount to snapshotCount
This commit is contained in:
parent
52d5e05201
commit
235ffc234d
@ -37,7 +37,7 @@ type Config struct {
|
||||
MaxRetryAttempts int `toml:"max_retry_attempts" env:"ETCD_MAX_RETRY_ATTEMPTS"`
|
||||
Name string `toml:"name" env:"ETCD_NAME"`
|
||||
Snapshot bool `toml:"snapshot" env:"ETCD_SNAPSHOT"`
|
||||
SnapCount int `toml:"snap_count" env:"ETCD_SNAPCOUNT"`
|
||||
SnapCount int `toml:"snapshot_count" env:"ETCD_SNAPSHOTCOUNT"`
|
||||
Verbose bool `toml:"verbose" env:"ETCD_VERBOSE"`
|
||||
VeryVerbose bool `toml:"very_verbose" env:"ETCD_VERY_VERBOSE"`
|
||||
WebURL string `toml:"web_url" env:"ETCD_WEB_URL"`
|
||||
@ -203,7 +203,7 @@ func (c *Config) LoadFlags(arguments []string) error {
|
||||
f.StringVar(&cors, "cors", "", "whitelist origins for cross-origin resource sharing (e.g. '*' or 'http://localhost:8001,etc')")
|
||||
|
||||
f.BoolVar(&c.Snapshot, "snapshot", c.Snapshot, "open or close snapshot")
|
||||
f.IntVar(&c.SnapCount, "snapCount", c.SnapCount, "save the in memory logs and states to a snapshot file after snapCount transactions")
|
||||
f.IntVar(&c.SnapCount, "snapshotCount", c.SnapCount, "save the in memory logs and states to a snapshot file after snapCount transactions")
|
||||
|
||||
// These flags are ignored since they were already parsed.
|
||||
var path string
|
||||
|
@ -13,7 +13,7 @@ import (
|
||||
func TestSimpleSnapshot(t *testing.T) {
|
||||
procAttr := new(os.ProcAttr)
|
||||
procAttr.Files = []*os.File{nil, os.Stdout, os.Stderr}
|
||||
args := []string{"etcd", "-n=node1", "-d=/tmp/node1", "-snapshot=true", "-snapCount=500"}
|
||||
args := []string{"etcd", "-n=node1", "-d=/tmp/node1", "-snapshot=true", "-snapshotCount=500"}
|
||||
|
||||
process, err := os.StartProcess(EtcdBinPath, append(args, "-f"), procAttr)
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user