Skip to content

Commit

Permalink
[TEST] Split delete by query tests pre-1.0 and post-1.0
Browse files Browse the repository at this point in the history
See elastic#4074 for details
  • Loading branch information
honzakral authored and brusic committed Jan 19, 2014
1 parent d85d914 commit 37c0fd8
Showing 1 changed file with 50 additions and 1 deletion.
51 changes: 50 additions & 1 deletion rest-api-spec/test/delete_by_query/10_basic.yaml
@@ -1,5 +1,8 @@
---
"Basic delete_by_query":
"Basic delete_by_query, post 1.0":
- skip:
version: "0 - 0.999"
reason: "Since 1.0 the query top-level key in the body is required"
- do:
index:
index: test_1
Expand Down Expand Up @@ -34,6 +37,52 @@

- is_true: ok

- do:
indices.refresh: {}

- do:
count:
index: test_1

- match: { count: 2 }
---
"Basic delete_by_query, pre 1.0":
- skip:
version: "1 - 999"
reason: "Since 1.0 the query top-level key in the body is required"
- do:
index:
index: test_1
type: test
id: 1
body: { foo: bar }

- do:
index:
index: test_1
type: test
id: 2
body: { foo: baz }

- do:
index:
index: test_1
type: test
id: 3
body: { foo: foo }

- do:
indices.refresh: {}

- do:
delete_by_query:
index: test_1
body:
match:
foo: bar

- is_true: ok

- do:
indices.refresh: {}

Expand Down

0 comments on commit 37c0fd8

Please sign in to comment.