Watcher: Changed check for `_status.version` in the REST tests

The check is failing, because even when the document is deleted before
the test, the version of the document in Elasticsearch sticks around
for a while.

I have changed the test to use the `is_true` operator to check for
the presence of the field only.

Original commit: elastic/x-pack-elasticsearch@308ffe34f0
This commit is contained in:
Karel Minarik 2016-07-01 20:00:12 +02:00
parent 4fae88f943
commit ec3b11d802
2 changed files with 2 additions and 3 deletions

View File

@ -7,7 +7,7 @@
- do:
xpack.watcher.put_watch:
id: "my_watch"
body: >
body: >
{
"trigger": {
"schedule": {
@ -43,5 +43,5 @@
id: "my_watch"
- match: { found : true}
- match: { _id: "my_watch" }
- match: { _status.version: 1 }
- is_true: _status.version
- is_false: watch.status

View File

@ -45,5 +45,4 @@
- match: { found : true }
- match: { _id: "my_watch" }
- match: { _status.version: 1 }
- match: { _status.state.active: false }