Fix Watcher REST test

Original commit: elastic/x-pack-elasticsearch@7cb5b08948
This commit is contained in:
Chris Earle 2016-08-17 15:35:18 -04:00
parent 76319495b6
commit c16860e901

View File

@ -13,9 +13,6 @@ teardown:
--- ---
"Test put watch api with action level condition": "Test put watch api with action level condition":
-skip:
version: "all"
reason: awaits fix bug URL https://github.com/elastic/x-plugins/issues/3137
- do: - do:
xpack.watcher.put_watch: xpack.watcher.put_watch:
id: "my_watch1" id: "my_watch1"
@ -31,9 +28,7 @@ teardown:
}, },
"input": { "input": {
"simple": { "simple": {
"payload": { "value": 15
"value": 15
}
} }
}, },
"condition": { "condition": {
@ -42,8 +37,10 @@ teardown:
"actions": { "actions": {
"test_index": { "test_index": {
"condition": { "condition": {
"ctx.payload.value": { "compare": {
"gt": 10 "ctx.payload.value": {
"lt": 10
}
} }
}, },
"index": { "index": {
@ -60,4 +57,4 @@ teardown:
id: "my_watch1" id: "my_watch1"
- match: { found : true} - match: { found : true}
- match: { _id: "my_watch1" } - match: { _id: "my_watch1" }
- match: { watch.actions.test_index.condition.ctx.payload.value.gt: 10 } - match: { watch.actions.test_index.condition.compare: { "ctx.payload.value": { lt: 10 } } }