Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,6 @@

- match: { status.state.active : false }

- do:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These test already made the corresponding get watch api calls,
so only need to remove the search api calls here.

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"
Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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::" }