2015-04-06 11:29:36 -04:00
|
|
|
---
|
|
|
|
"Test ack watch api":
|
|
|
|
- do:
|
|
|
|
cluster.health:
|
2015-05-07 15:43:09 +02:00
|
|
|
wait_for_status: yellow
|
2015-04-06 11:29:36 -04:00
|
|
|
|
|
|
|
- do:
|
2015-04-28 19:08:28 -04:00
|
|
|
watcher.put_watch:
|
2015-04-06 11:29:36 -04:00
|
|
|
id: "my_watch"
|
2015-05-07 12:13:39 -04:00
|
|
|
master_timeout: "40s"
|
2015-04-06 11:29:36 -04:00
|
|
|
body: >
|
|
|
|
{
|
2015-05-04 16:19:41 -04:00
|
|
|
"trigger" : {
|
|
|
|
"schedule" : { "cron" : "0 0 0 1 * ? 2099" }
|
2015-04-06 11:29:36 -04:00
|
|
|
},
|
|
|
|
"input": {
|
|
|
|
"simple": {
|
|
|
|
"payload": {
|
|
|
|
"send": "yes"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"condition": {
|
2015-04-27 09:33:23 -04:00
|
|
|
"always": {}
|
2015-04-06 11:29:36 -04:00
|
|
|
},
|
2015-05-04 20:37:16 -04:00
|
|
|
"actions": {
|
2015-04-06 11:29:36 -04:00
|
|
|
"test_index": {
|
|
|
|
"index": {
|
|
|
|
"index": "test",
|
2015-04-27 09:33:23 -04:00
|
|
|
"doc_type": "test2"
|
2015-04-06 11:29:36 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-05-04 20:37:16 -04:00
|
|
|
}
|
2015-05-27 01:08:17 +02:00
|
|
|
|
2015-04-06 11:29:36 -04:00
|
|
|
- match: { _id: "my_watch" }
|
|
|
|
|
|
|
|
- do:
|
|
|
|
cluster.health:
|
2015-05-07 15:43:09 +02:00
|
|
|
wait_for_status: yellow
|
2015-04-06 11:29:36 -04:00
|
|
|
|
|
|
|
- do:
|
2015-05-07 15:41:33 +02:00
|
|
|
watcher.ack_watch:
|
2015-05-27 01:08:17 +02:00
|
|
|
watch_id: "my_watch"
|
|
|
|
action_id: "test_index"
|
2015-05-07 15:41:33 +02:00
|
|
|
|
2015-05-27 01:08:17 +02:00
|
|
|
- match: { "status.actions.test_index.ack.state" : "awaits_successful_execution" }
|
2015-04-06 11:29:36 -04:00
|
|
|
|
|
|
|
- do:
|
2015-05-07 15:41:33 +02:00
|
|
|
watcher.delete_watch:
|
|
|
|
id: "my_watch"
|
|
|
|
|
2015-04-06 11:29:36 -04:00
|
|
|
- match: { found: true }
|