53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
---
|
|
"Test ack watch api":
|
|
- 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"
|
|
|
|
- match: { "_status.actions.test_index.ack.state" : "awaits_successful_execution" }
|
|
|
|
- do:
|
|
watcher.delete_watch:
|
|
id: "my_watch"
|
|
|
|
- match: { found: true }
|