mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
test(delete_handler_test.go) fix inconsistent between test case and comments
This commit is contained in:
parent
bfa7d54b02
commit
c36f306a1d
@ -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", "")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user