2015-05-27 15:24:31 -04:00
|
|
|
---
|
|
|
|
"Test ack watch api on an individual action":
|
|
|
|
- do:
|
|
|
|
cluster.health:
|
|
|
|
wait_for_status: yellow
|
|
|
|
|
|
|
|
- do:
|
|
|
|
watcher.put_watch:
|
|
|
|
id: "my_watch"
|
|
|
|
master_timeout: "40s"
|
|
|
|
body: >
|
|
|
|
{
|
|
|
|
"trigger" : {
|
|
|
|
"schedule" : { "cron" : "0 0 0 1 * ? 2099" }
|
|
|
|
},
|
|
|
|
"input": {
|
|
|
|
"simple": {
|
|
|
|
"payload": {
|
|
|
|
"send": "yes"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"condition": {
|
|
|
|
"always": {}
|
|
|
|
},
|
|
|
|
"actions": {
|
|
|
|
"test_index": {
|
|
|
|
"index": {
|
|
|
|
"index": "test",
|
|
|
|
"doc_type": "test2"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- match: { _id: "my_watch" }
|
|
|
|
|
|
|
|
- do:
|
|
|
|
cluster.health:
|
|
|
|
wait_for_status: yellow
|
|
|
|
|
|
|
|
- do:
|
|
|
|
watcher.ack_watch:
|
|
|
|
watch_id: "my_watch"
|
|
|
|
action_id: "test_index"
|
|
|
|
|
2015-06-25 06:57:23 -04:00
|
|
|
- match: { "_status.actions.test_index.ack.state" : "awaits_successful_execution" }
|
2015-05-27 15:24:31 -04:00
|
|
|
|
|
|
|
- do:
|
|
|
|
watcher.delete_watch:
|
|
|
|
id: "my_watch"
|
|
|
|
|
|
|
|
- match: { found: true }
|
|
|
|
|