diff --git a/server/v2/tests/put_handler_test.go b/server/v2/tests/put_handler_test.go index 4efac3866..42200db82 100644 --- a/server/v2/tests/put_handler_test.go +++ b/server/v2/tests/put_handler_test.go @@ -95,7 +95,7 @@ func TestV2CreateKeyFail(t *testing.T) { resp, _ = tests.PutForm(fmt.Sprintf("%s%s", s.URL(), "/v2/keys/foo/bar"), v) body := tests.ReadBodyJSON(resp) assert.Equal(t, body["errorCode"], 105, "") - assert.Equal(t, body["message"], "Already exists", "") + assert.Equal(t, body["message"], "Key already exists", "") assert.Equal(t, body["cause"], "/foo/bar", "") }) } @@ -139,7 +139,7 @@ func TestV2UpdateKeyFailOnValue(t *testing.T) { resp, _ = tests.PutForm(fmt.Sprintf("%s%s", s.URL(), "/v2/keys/foo/bar"), v) body := tests.ReadBodyJSON(resp) assert.Equal(t, body["errorCode"], 100, "") - assert.Equal(t, body["message"], "Key Not Found", "") + assert.Equal(t, body["message"], "Key not found", "") assert.Equal(t, body["cause"], "/foo/bar", "") }) } @@ -157,7 +157,7 @@ func TestV2UpdateKeyFailOnMissingDirectory(t *testing.T) { resp, _ := tests.PutForm(fmt.Sprintf("%s%s", s.URL(), "/v2/keys/foo/bar"), v) body := tests.ReadBodyJSON(resp) assert.Equal(t, body["errorCode"], 100, "") - assert.Equal(t, body["message"], "Key Not Found", "") + assert.Equal(t, body["message"], "Key not found", "") assert.Equal(t, body["cause"], "/foo", "") }) } @@ -201,7 +201,7 @@ func TestV2SetKeyCASOnIndexFail(t *testing.T) { resp, _ = tests.PutForm(fmt.Sprintf("%s%s", s.URL(), "/v2/keys/foo/bar"), v) body := tests.ReadBodyJSON(resp) assert.Equal(t, body["errorCode"], 101, "") - assert.Equal(t, body["message"], "Test Failed", "") + assert.Equal(t, body["message"], "Compare failed", "") assert.Equal(t, body["cause"], "[ != XXX] [10 != 2]", "") assert.Equal(t, body["index"], 2, "") }) @@ -263,7 +263,7 @@ func TestV2SetKeyCASOnValueFail(t *testing.T) { resp, _ = tests.PutForm(fmt.Sprintf("%s%s", s.URL(), "/v2/keys/foo/bar"), v) body := tests.ReadBodyJSON(resp) assert.Equal(t, body["errorCode"], 101, "") - assert.Equal(t, body["message"], "Test Failed", "") + assert.Equal(t, body["message"], "Compare failed", "") assert.Equal(t, body["cause"], "[AAA != XXX] [0 != 2]", "") assert.Equal(t, body["index"], 2, "") }) diff --git a/store/store_test.go b/store/store_test.go index edb2d5b04..6d21ccd07 100644 --- a/store/store_test.go +++ b/store/store_test.go @@ -117,7 +117,7 @@ func TestStoreCreateFailsIfExists(t *testing.T) { e, _err := s.Create("/foo", true, "", false, Permanent) err := _err.(*etcdErr.Error) assert.Equal(t, err.ErrorCode, etcdErr.EcodeNodeExist, "") - assert.Equal(t, err.Message, "Already exists", "") + assert.Equal(t, err.Message, "Key already exists", "") assert.Equal(t, err.Cause, "/foo", "") assert.Equal(t, err.Index, uint64(1), "") assert.Nil(t, e, 0, "") @@ -147,7 +147,7 @@ func TestStoreUpdateFailsIfDirectory(t *testing.T) { e, _err := s.Update("/foo", "baz", Permanent) err := _err.(*etcdErr.Error) assert.Equal(t, err.ErrorCode, etcdErr.EcodeNotFile, "") - assert.Equal(t, err.Message, "Not A File", "") + assert.Equal(t, err.Message, "Not a file", "") assert.Equal(t, err.Cause, "/foo", "") assert.Nil(t, e, "") } @@ -240,7 +240,7 @@ func TestStoreDeleteDiretoryFailsIfNonRecursive(t *testing.T) { e, _err := s.Delete("/foo", false, false) err := _err.(*etcdErr.Error) assert.Equal(t, err.ErrorCode, etcdErr.EcodeNotFile, "") - assert.Equal(t, err.Message, "Not A File", "") + assert.Equal(t, err.Message, "Not a file", "") assert.Nil(t, e, "") } @@ -264,7 +264,7 @@ func TestStoreCompareAndSwapPrevValueFailsIfNotMatch(t *testing.T) { e, _err := s.CompareAndSwap("/foo", "wrong_value", 0, "baz", Permanent) err := _err.(*etcdErr.Error) assert.Equal(t, err.ErrorCode, etcdErr.EcodeTestFailed, "") - assert.Equal(t, err.Message, "Test Failed", "") + assert.Equal(t, err.Message, "Compare failed", "") assert.Nil(t, e, "") e, _ = s.Get("/foo", false, false) assert.Equal(t, e.Node.Value, "bar", "") @@ -290,7 +290,7 @@ func TestStoreCompareAndSwapPrevIndexFailsIfNotMatch(t *testing.T) { e, _err := s.CompareAndSwap("/foo", "", 100, "baz", Permanent) err := _err.(*etcdErr.Error) assert.Equal(t, err.ErrorCode, etcdErr.EcodeTestFailed, "") - assert.Equal(t, err.Message, "Test Failed", "") + assert.Equal(t, err.Message, "Compare failed", "") assert.Nil(t, e, "") e, _ = s.Get("/foo", false, false) assert.Equal(t, e.Node.Value, "bar", "") diff --git a/tests/functional/v1_migration_test.go b/tests/functional/v1_migration_test.go index 9f4fbeeea..c8906a915 100644 --- a/tests/functional/v1_migration_test.go +++ b/tests/functional/v1_migration_test.go @@ -92,7 +92,7 @@ func TestV1ClusterMigration(t *testing.T) { body := tests.ReadBody(resp) assert.Nil(t, err, "") assert.Equal(t, resp.StatusCode, 400) - assert.Equal(t, string(body), `{"errorCode":100,"message":"Key Not Found","cause":"/message","index":11}`+"\n") + assert.Equal(t, string(body), `{"errorCode":100,"message":"Key not found","cause":"/message","index":11}`+"\n") // Ensure TTL'd message is removed. resp, err = tests.Get("http://localhost:4001/v2/keys/foo")