diff --git a/x-pack/plugin/watcher/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/watcher/ack_watch/10_basic.yml b/x-pack/plugin/watcher/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/watcher/ack_watch/10_basic.yml index 3a3f962ce6f54..7c88f3d75a4b2 100644 --- a/x-pack/plugin/watcher/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/watcher/ack_watch/10_basic.yml +++ b/x-pack/plugin/watcher/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/watcher/ack_watch/10_basic.yml @@ -46,14 +46,11 @@ - match: { "status.actions.test_index.ack.state" : "awaits_successful_execution" } - do: - warnings: - - "this request accesses system indices: [.watches], but in a future major version, direct access to system indices will be prevented by default" - search: - rest_total_hits_as_int: true - index: .watches - body: { "query": { "term": { "_id": "my_watch" } } } - - match: { hits.total: 1 } - - match: { hits.hits.0._source.status.actions.test_index.ack.state: "awaits_successful_execution" } + watcher.get_watch: + id: "my_watch" + - match: { found: true } + - match: { _id: "my_watch" } + - match: { status.actions.test_index.ack.state: "awaits_successful_execution" } - do: watcher.delete_watch: diff --git a/x-pack/plugin/watcher/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/watcher/activate_watch/10_basic.yml b/x-pack/plugin/watcher/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/watcher/activate_watch/10_basic.yml index 015310babd29d..da15e624a0f46 100644 --- a/x-pack/plugin/watcher/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/watcher/activate_watch/10_basic.yml +++ b/x-pack/plugin/watcher/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/watcher/activate_watch/10_basic.yml @@ -49,16 +49,6 @@ - match: { status.state.active : false } - - do: - warnings: - - "this request accesses system indices: [.watches], but in a future major version, direct access to system indices will be prevented by default" - search: - rest_total_hits_as_int: true - index: .watches - body: { "query": { "term": { "_id": "my_watch" } } } - - match: { hits.total: 1 } - - match: { hits.hits.0._source.status.state.active: false } - - do: watcher.get_watch: id: "my_watch" @@ -72,16 +62,6 @@ - match: { status.state.active : true } - - do: - warnings: - - "this request accesses system indices: [.watches], but in a future major version, direct access to system indices will be prevented by default" - search: - rest_total_hits_as_int: true - index: .watches - body: { "query": { "term": { "_id": "my_watch" } } } - - match: { hits.total: 1 } - - match: { hits.hits.0._source.status.state.active: true } - - do: watcher.get_watch: id: "my_watch" diff --git a/x-pack/plugin/watcher/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/watcher/delete_watch/10_basic.yml b/x-pack/plugin/watcher/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/watcher/delete_watch/10_basic.yml index 1b999a5eabe35..ad4f542ee8b52 100644 --- a/x-pack/plugin/watcher/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/watcher/delete_watch/10_basic.yml +++ b/x-pack/plugin/watcher/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/watcher/delete_watch/10_basic.yml @@ -48,19 +48,23 @@ teardown: - match: { _id: "my_watch" } - match: { created: true } + - do: + watcher.get_watch: + id: "my_watch" + - match: { found: true } + - match: { _id: "my_watch" } + - do: watcher.delete_watch: id: "my_watch" - match: { found: true } - do: - warnings: - - "this request accesses system indices: [.watches], but in a future major version, direct access to system indices will be prevented by default" - search: - rest_total_hits_as_int: true - index: .watches - body: { "query": { "term": { "_id": "my_watch" } } } - - match: { hits.total: 0 } + catch: missing + watcher.get_watch: + id: "my_watch" + - match: { found: false } + - match: { _id: "my_watch" } --- "Non existent watch returns 404": diff --git a/x-pack/plugin/watcher/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/watcher/get_watch/10_basic.yml b/x-pack/plugin/watcher/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/watcher/get_watch/10_basic.yml index 913366853b974..0894c9d163e96 100644 --- a/x-pack/plugin/watcher/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/watcher/get_watch/10_basic.yml +++ b/x-pack/plugin/watcher/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/watcher/get_watch/10_basic.yml @@ -48,15 +48,6 @@ teardown: - match: { _id: "my_watch" } - match: { created: true } - - do: - warnings: - - "this request accesses system indices: [.watches], but in a future major version, direct access to system indices will be prevented by default" - search: - rest_total_hits_as_int: true - index: .watches - body: { "query": { "term": { "_id": "my_watch" } } } - - match: { hits.total: 1 } - - do: watcher.get_watch: id: "my_watch" diff --git a/x-pack/plugin/watcher/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/watcher/put_watch/80_put_get_watch_with_passwords.yml b/x-pack/plugin/watcher/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/watcher/put_watch/80_put_get_watch_with_passwords.yml index b66579d7b044e..9601d1b1b025d 100644 --- a/x-pack/plugin/watcher/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/watcher/put_watch/80_put_get_watch_with_passwords.yml +++ b/x-pack/plugin/watcher/qa/rest/src/yamlRestTest/resources/rest-api-spec/test/watcher/put_watch/80_put_get_watch_with_passwords.yml @@ -262,25 +262,9 @@ setup: } - do: - warnings: - - "this request accesses system indices: [.watches], but in a future major version, direct access to system indices will be prevented by default" - search: - rest_total_hits_as_int: true - index: .watches - body: > - { - "query": { - "term": { - "_id": { - "value": "watch_with_seq_no" - } - } - } - } - - - - match: { hits.total: 1 } - - match: { hits.hits.0._id: "watch_with_seq_no" } - - match: { hits.hits.0._source.input.http.request.auth.basic.username: "new_user" } - - match: { hits.hits.0._source.input.http.request.auth.basic.password: "pass" } - + watcher.get_watch: + id: "watch_with_seq_no" + - match: { found: true } + - match: { _id: "watch_with_seq_no" } + - match: { watch.input.http.request.auth.basic.username: "new_user" } + - match: { watch.input.http.request.auth.basic.password: "::es_redacted::" }