OpenSearch/watcher/rest-api-spec/test/ack_watch/20_ack_individual_action.yaml

55 lines
1.1 KiB
YAML
Raw Normal View History

---
"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"
- match: { "_status.actions.test_index.ack.state" : "awaits_successful_execution" }
- do:
watcher.delete_watch:
id: "my_watch"
- match: { found: true }