mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-02 17:09:18 +00:00
Watcher: Added teardown
sections to the REST tests
The tests have been failing because they haven't cleaned up the environment after their run, leaving documents with watches behind. This patch adds `teardown` sections which delete the documents created by tests. Related: elastic/elasticsearch#2648 Closes elastic/elasticsearch#2690 Original commit: elastic/x-pack-elasticsearch@e34e40d879
This commit is contained in:
parent
ec3b11d802
commit
427563132e
@ -1,9 +1,18 @@
|
||||
---
|
||||
"Test get watch api":
|
||||
setup:
|
||||
- do:
|
||||
cluster.health:
|
||||
wait_for_status: yellow
|
||||
|
||||
---
|
||||
teardown:
|
||||
- do:
|
||||
xpack.watcher.delete_watch:
|
||||
id: "my_watch"
|
||||
ignore: 404
|
||||
|
||||
---
|
||||
"Test get watch api":
|
||||
- do:
|
||||
xpack.watcher.put_watch:
|
||||
id: "my_watch"
|
||||
|
@ -1,10 +1,18 @@
|
||||
---
|
||||
"Getting started - Monitor cluster health":
|
||||
setup:
|
||||
- do:
|
||||
cluster.health:
|
||||
wait_for_status: yellow
|
||||
wait_for_status: yellow
|
||||
|
||||
---
|
||||
teardown:
|
||||
- do:
|
||||
xpack.watcher.delete_watch:
|
||||
id: "cluster_health_watch"
|
||||
ignore: 404
|
||||
|
||||
---
|
||||
"Getting started - Monitor cluster health":
|
||||
- do:
|
||||
xpack.watcher.stats: {}
|
||||
- match: { "watcher_state": "started" }
|
||||
|
@ -1,9 +1,18 @@
|
||||
---
|
||||
"Test put watch api with watch level throttle":
|
||||
setup:
|
||||
- do:
|
||||
cluster.health:
|
||||
wait_for_status: yellow
|
||||
wait_for_status: yellow
|
||||
|
||||
---
|
||||
teardown:
|
||||
- do:
|
||||
xpack.watcher.delete_watch:
|
||||
id: "my_watch1"
|
||||
ignore: 404
|
||||
|
||||
---
|
||||
"Test put watch api with watch level throttle":
|
||||
- do:
|
||||
xpack.watcher.put_watch:
|
||||
id: "my_watch1"
|
||||
|
@ -1,9 +1,18 @@
|
||||
---
|
||||
"Test put watch api with action level throttle period":
|
||||
setup:
|
||||
- do:
|
||||
cluster.health:
|
||||
wait_for_status: yellow
|
||||
wait_for_status: yellow
|
||||
|
||||
---
|
||||
teardown:
|
||||
- do:
|
||||
xpack.watcher.delete_watch:
|
||||
id: "my_watch1"
|
||||
ignore: 404
|
||||
|
||||
---
|
||||
"Test put watch api with action level throttle period":
|
||||
- do:
|
||||
xpack.watcher.put_watch:
|
||||
id: "my_watch1"
|
||||
|
@ -1,15 +1,24 @@
|
||||
---
|
||||
"Test put inactive watch":
|
||||
setup:
|
||||
- do:
|
||||
cluster.health:
|
||||
wait_for_status: yellow
|
||||
|
||||
---
|
||||
teardown:
|
||||
- do:
|
||||
xpack.watcher.delete_watch:
|
||||
id: "my_watch"
|
||||
ignore: 404
|
||||
|
||||
---
|
||||
"Test put inactive watch":
|
||||
- do:
|
||||
xpack.watcher.put_watch:
|
||||
id: "my_watch"
|
||||
master_timeout: "40s"
|
||||
active: false
|
||||
body: >
|
||||
body: >
|
||||
{
|
||||
"trigger": {
|
||||
"schedule": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user