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