mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-03 09:29:11 +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:
|
- do:
|
||||||
cluster.health:
|
cluster.health:
|
||||||
wait_for_status: yellow
|
wait_for_status: yellow
|
||||||
|
|
||||||
|
---
|
||||||
|
teardown:
|
||||||
|
- do:
|
||||||
|
xpack.watcher.delete_watch:
|
||||||
|
id: "my_watch"
|
||||||
|
ignore: 404
|
||||||
|
|
||||||
|
---
|
||||||
|
"Test get watch api":
|
||||||
- do:
|
- do:
|
||||||
xpack.watcher.put_watch:
|
xpack.watcher.put_watch:
|
||||||
id: "my_watch"
|
id: "my_watch"
|
||||||
|
@ -1,10 +1,18 @@
|
|||||||
---
|
---
|
||||||
"Getting started - Monitor cluster health":
|
setup:
|
||||||
- do:
|
- do:
|
||||||
cluster.health:
|
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:
|
- do:
|
||||||
xpack.watcher.stats: {}
|
xpack.watcher.stats: {}
|
||||||
- match: { "watcher_state": "started" }
|
- match: { "watcher_state": "started" }
|
||||||
|
@ -1,9 +1,18 @@
|
|||||||
---
|
---
|
||||||
"Test put watch api with watch level throttle":
|
setup:
|
||||||
- do:
|
- do:
|
||||||
cluster.health:
|
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:
|
- do:
|
||||||
xpack.watcher.put_watch:
|
xpack.watcher.put_watch:
|
||||||
id: "my_watch1"
|
id: "my_watch1"
|
||||||
|
@ -1,9 +1,18 @@
|
|||||||
---
|
---
|
||||||
"Test put watch api with action level throttle period":
|
setup:
|
||||||
- do:
|
- do:
|
||||||
cluster.health:
|
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:
|
- do:
|
||||||
xpack.watcher.put_watch:
|
xpack.watcher.put_watch:
|
||||||
id: "my_watch1"
|
id: "my_watch1"
|
||||||
|
@ -1,15 +1,24 @@
|
|||||||
---
|
---
|
||||||
"Test put inactive watch":
|
setup:
|
||||||
- do:
|
- do:
|
||||||
cluster.health:
|
cluster.health:
|
||||||
wait_for_status: yellow
|
wait_for_status: yellow
|
||||||
|
|
||||||
|
---
|
||||||
|
teardown:
|
||||||
|
- do:
|
||||||
|
xpack.watcher.delete_watch:
|
||||||
|
id: "my_watch"
|
||||||
|
ignore: 404
|
||||||
|
|
||||||
|
---
|
||||||
|
"Test put inactive watch":
|
||||||
- do:
|
- do:
|
||||||
xpack.watcher.put_watch:
|
xpack.watcher.put_watch:
|
||||||
id: "my_watch"
|
id: "my_watch"
|
||||||
master_timeout: "40s"
|
master_timeout: "40s"
|
||||||
active: false
|
active: false
|
||||||
body: >
|
body: >
|
||||||
{
|
{
|
||||||
"trigger": {
|
"trigger": {
|
||||||
"schedule": {
|
"schedule": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user