tests/e2e: use different parameters

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyuho Lee 2018-05-09 15:14:23 -07:00
parent c862712c73
commit df87dba218
5 changed files with 11 additions and 10 deletions

View File

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

View File

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

View File

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

View File

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

View File

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