Browse Source

fix(tests/v1_migration): add a -name flag

The info flag is ignored as of 1c91c167fc98608ef850a7539550bfc15dedbb46
so in order for this test to work we need to add `-name` flag.
Brandon Philips 12 years ago
parent
commit
da3fe920cb
1 changed files with 2 additions and 0 deletions
  1. 2 0
      tests/functional/v1_migration_test.go

+ 2 - 0
tests/functional/v1_migration_test.go

@@ -37,6 +37,7 @@ func TestV1SoloMigration(t *testing.T) {
 	args := []string{"etcd", fmt.Sprintf("-data-dir=%s", nodepath)}
 	args := []string{"etcd", fmt.Sprintf("-data-dir=%s", nodepath)}
 	args = append(args, "-addr", "127.0.0.1:4001")
 	args = append(args, "-addr", "127.0.0.1:4001")
 	args = append(args, "-peer-addr", "127.0.0.1:7001")
 	args = append(args, "-peer-addr", "127.0.0.1:7001")
+	args = append(args, "-name", "v1")
 	process, err := os.StartProcess(EtcdBinPath, args, procAttr)
 	process, err := os.StartProcess(EtcdBinPath, args, procAttr)
 	if err != nil {
 	if err != nil {
 		t.Fatal("start process failed:" + err.Error())
 		t.Fatal("start process failed:" + err.Error())
@@ -79,6 +80,7 @@ func TestV1ClusterMigration(t *testing.T) {
 		args := []string{"etcd", fmt.Sprintf("-data-dir=%s", nodepath)}
 		args := []string{"etcd", fmt.Sprintf("-data-dir=%s", nodepath)}
 		args = append(args, "-addr", fmt.Sprintf("127.0.0.1:%d", 4001+i))
 		args = append(args, "-addr", fmt.Sprintf("127.0.0.1:%d", 4001+i))
 		args = append(args, "-peer-addr", fmt.Sprintf("127.0.0.1:%d", 7001+i))
 		args = append(args, "-peer-addr", fmt.Sprintf("127.0.0.1:%d", 7001+i))
+		args = append(args, "-name", node)
 		process, err := os.StartProcess(EtcdBinPath, args, procAttr)
 		process, err := os.StartProcess(EtcdBinPath, args, procAttr)
 		if err != nil {
 		if err != nil {
 			t.Fatal("start process failed:" + err.Error())
 			t.Fatal("start process failed:" + err.Error())