Brian Murphy 94bea8f83a Change the watch specific actions to reflect that they operate on watches.
This change changes the watch specific actions put/get/delete/execute/ack to be watcher.<action>_watch.

Original commit: elastic/x-pack-elasticsearch@86a91cb141
2015-04-28 19:08:28 -04:00

54 lines
1.1 KiB
YAML

---
"Test ack watch api":
- do:
cluster.health:
wait_for_status: green
- do:
watcher.put_watch:
id: "my_watch"
body: >
{
"trigger": {
"schedule": {
"hourly": {
"minute": [ 0, 5 ]
}
}
},
"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: green
- do:
watcher.ack_watch:
id: "my_watch"
- match: { "status.ack.state" : "awaits_execution" }
- do:
watcher.delete_watch:
id: "my_watch"
- match: { found: true }