Browse Source

refactor change cmd argument snapCount to snapshotCount

Xiang Li 12 years ago
parent
commit
235ffc234d
2 changed files with 3 additions and 3 deletions
  1. 2 2
      server/config.go
  2. 1 1
      tests/functional/simple_snapshot_test.go

+ 2 - 2
server/config.go

@@ -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

+ 1 - 1
tests/functional/simple_snapshot_test.go

@@ -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 {