test(delete_handler_test.go) fix inconsistent between test case and comments

This commit is contained in:
Xiang Li 2013-12-25 19:05:40 +08:00
parent bfa7d54b02
commit c36f306a1d

View File

@ -87,7 +87,7 @@ func TestV2DeleteDirectoryRecursiveImpliesDir(t *testing.T) {
// Ensures that a key is deleted if the previous index matches // Ensures that a key is deleted if the previous index matches
// //
// $ curl -X PUT localhost:4001/v2/keys/foo -d value=XXX // $ curl -X PUT localhost:4001/v2/keys/foo -d value=XXX
// $ curl -X DELETE localhost:4001/v2/keys/foo?prevIndex=1 // $ curl -X DELETE localhost:4001/v2/keys/foo?prevIndex=2
// //
func TestV2DeleteKeyCADOnIndexSuccess(t *testing.T) { func TestV2DeleteKeyCADOnIndexSuccess(t *testing.T) {
tests.RunServer(func(s *server.Server) { tests.RunServer(func(s *server.Server) {
@ -97,7 +97,6 @@ func TestV2DeleteKeyCADOnIndexSuccess(t *testing.T) {
tests.ReadBody(resp) tests.ReadBody(resp)
resp, err = tests.DeleteForm(fmt.Sprintf("%s%s", s.URL(), "/v2/keys/foo?prevIndex=2"), url.Values{}) resp, err = tests.DeleteForm(fmt.Sprintf("%s%s", s.URL(), "/v2/keys/foo?prevIndex=2"), url.Values{})
assert.Nil(t, err, "") assert.Nil(t, err, "")
fmt.Println(resp)
body := tests.ReadBodyJSON(resp) body := tests.ReadBodyJSON(resp)
assert.Equal(t, body["action"], "compareAndDelete", "") assert.Equal(t, body["action"], "compareAndDelete", "")