mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-04 18:09:21 +00:00
This change adds tests to ack a subset of a watch's actions, use a different throttle period per action in a watch, also adds tests to make sure that both the watch level and global level throttle_period are applied correctly. Also updates the REST tests to make sure that throttle periods can be set at a watch and action level and are returned from the GET API. Original commit: elastic/x-pack-elasticsearch@4b006c7830
55 lines
1.1 KiB
YAML
55 lines
1.1 KiB
YAML
---
|
|
"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 }
|
|
|