From 37c0fd8809cecc61a031a93e418c507e63e2ef87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Kr=C3=A1l?= Date: Thu, 2 Jan 2014 18:46:55 +0100 Subject: [PATCH] [TEST] Split delete by query tests pre-1.0 and post-1.0 See #4074 for details --- .../test/delete_by_query/10_basic.yaml | 51 ++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/rest-api-spec/test/delete_by_query/10_basic.yaml b/rest-api-spec/test/delete_by_query/10_basic.yaml index be5d3e8a6ebb5..d39cbebae570d 100644 --- a/rest-api-spec/test/delete_by_query/10_basic.yaml +++ b/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 @@ -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: {}