Browse Source

tests/e2e: use different parameters

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Gyuho Lee 7 years ago
parent
commit
df87dba218

+ 4 - 4
tests/e2e/ctl_v2_test.go

@@ -251,7 +251,7 @@ func testCtlV2Backup(t *testing.T, snapCount int, v3 bool) {
 		t.Fatal(err)
 	}
 
-	if err := etcdctlSet(epc1, "foo1", "bar"); err != nil {
+	if err := etcdctlSet(epc1, "foo1", "bar1"); err != nil {
 		t.Fatal(err)
 	}
 
@@ -276,7 +276,7 @@ func testCtlV2Backup(t *testing.T, snapCount int, v3 bool) {
 	epc2 := setupEtcdctlTest(t, &cfg2, false)
 
 	// check if backup went through correctly
-	if err := etcdctlGet(epc2, "foo1", "bar", false); err != nil {
+	if err := etcdctlGet(epc2, "foo1", "bar1", false); err != nil {
 		t.Fatal(err)
 	}
 
@@ -292,10 +292,10 @@ func testCtlV2Backup(t *testing.T, snapCount int, v3 bool) {
 	}
 
 	// check if it can serve client requests
-	if err := etcdctlSet(epc2, "foo2", "bar"); err != nil {
+	if err := etcdctlSet(epc2, "foo2", "bar2"); err != nil {
 		t.Fatal(err)
 	}
-	if err := etcdctlGet(epc2, "foo2", "bar", false); err != nil {
+	if err := etcdctlGet(epc2, "foo2", "bar2", false); err != nil {
 		t.Fatal(err)
 	}
 

+ 1 - 1
tests/e2e/ctl_v3_auth_test.go

@@ -968,7 +968,7 @@ func authTestSnapshot(cx ctlCtx) {
 	cx.user, cx.pass = "root", "root"
 	authSetupTestUser(cx)
 
-	fpath := "test.snapshot"
+	fpath := "test-auth.snapshot"
 	defer os.RemoveAll(fpath)
 
 	// ordinary user cannot save a snapshot

+ 2 - 1
tests/e2e/ctl_v3_kv_test.go

@@ -18,9 +18,10 @@ import (
 	"fmt"
 	"strings"
 	"testing"
+	"time"
 )
 
-func TestCtlV3Put(t *testing.T)              { testCtl(t, putTest) }
+func TestCtlV3Put(t *testing.T)              { testCtl(t, putTest, withDialTimeout(7*time.Second)) }
 func TestCtlV3PutNoTLS(t *testing.T)         { testCtl(t, putTest, withCfg(configNoTLS)) }
 func TestCtlV3PutClientTLS(t *testing.T)     { testCtl(t, putTest, withCfg(configClientTLS)) }
 func TestCtlV3PutClientAutoTLS(t *testing.T) { testCtl(t, putTest, withCfg(configClientAutoTLS)) }

+ 1 - 1
tests/e2e/ctl_v3_lock_test.go

@@ -84,7 +84,7 @@ func testLock(cx ctlCtx) {
 	if err = holder.Signal(os.Interrupt); err != nil {
 		cx.t.Fatal(err)
 	}
-	if err = closeWithTimeout(holder, time.Second); err != nil {
+	if err = closeWithTimeout(holder, 200*time.Millisecond+time.Second); err != nil {
 		cx.t.Fatal(err)
 	}
 

+ 3 - 3
tests/e2e/ctl_v3_snapshot_test.go

@@ -43,7 +43,7 @@ func snapshotTest(cx ctlCtx) {
 		cx.t.Fatalf("snapshot: ctlV3Put error (%v)", err)
 	}
 
-	fpath := "test.snapshot"
+	fpath := "test1.snapshot"
 	defer os.RemoveAll(fpath)
 
 	if err = ctlV3SnapshotSave(cx, fpath); err != nil {
@@ -65,7 +65,7 @@ func snapshotTest(cx ctlCtx) {
 func TestCtlV3SnapshotCorrupt(t *testing.T) { testCtl(t, snapshotCorruptTest) }
 
 func snapshotCorruptTest(cx ctlCtx) {
-	fpath := "test.snapshot"
+	fpath := "test2.snapshot"
 	defer os.RemoveAll(fpath)
 
 	if err := ctlV3SnapshotSave(cx, fpath); err != nil {
@@ -98,7 +98,7 @@ func snapshotCorruptTest(cx ctlCtx) {
 func TestCtlV3SnapshotStatusBeforeRestore(t *testing.T) { testCtl(t, snapshotStatusBeforeRestoreTest) }
 
 func snapshotStatusBeforeRestoreTest(cx ctlCtx) {
-	fpath := "test.snapshot"
+	fpath := "test3.snapshot"
 	defer os.RemoveAll(fpath)
 
 	if err := ctlV3SnapshotSave(cx, fpath); err != nil {