Watcher: Fixed YAML syntax for `xpack.watcher.stats` calls in REST tests

The shorthand format has been failing in the Ruby runner. Not sure if
this is particular to the Ruby YAML library, but I think there's no
harm in making the syntax standard.

Original commit: elastic/x-pack-elasticsearch@d753cad64a
This commit is contained in:
Karel Minarik 2016-07-01 19:07:26 +02:00
parent dc6e78a62c
commit 4fae88f943
2 changed files with 13 additions and 7 deletions

View File

@ -10,7 +10,8 @@
wait_for_status: yellow wait_for_status: yellow
- do: {xpack.watcher.stats:{}} - do:
xpack.watcher.stats: {}
- match: { "watcher_state": "started" } - match: { "watcher_state": "started" }
- match: { "watch_count": 0 } - match: { "watch_count": 0 }
@ -93,7 +94,8 @@
- do: - do:
indices.refresh: {} indices.refresh: {}
- do: {xpack.watcher.stats:{}} - do:
xpack.watcher.stats: {}
- match: { "watch_count": 1 } - match: { "watch_count": 1 }
# Simulate a Thread.sleep() # Simulate a Thread.sleep()
@ -142,5 +144,6 @@
- match: { found: true } - match: { found: true }
- do: {xpack.watcher.stats:{}} - do:
xpack.watcher.stats: {}
- match: { "watch_count": 0 } - match: { "watch_count": 0 }

View File

@ -5,14 +5,15 @@
wait_for_status: yellow wait_for_status: yellow
- do: {xpack.watcher.stats:{}} - do:
xpack.watcher.stats: {}
- match: { "watcher_state": "started" } - match: { "watcher_state": "started" }
- match: { "watch_count": 0 } - match: { "watch_count": 0 }
- do: - do:
xpack.watcher.put_watch: xpack.watcher.put_watch:
id: "cluster_health_watch" id: "cluster_health_watch"
body: > body: >
{ {
"trigger": { "trigger": {
"schedule": { "schedule": {
@ -52,7 +53,8 @@
- match: { _id: "cluster_health_watch" } - match: { _id: "cluster_health_watch" }
- match: { created: true } - match: { created: true }
- do: {xpack.watcher.stats:{}} - do:
xpack.watcher.stats: {}
- match: { "watch_count": 1 } - match: { "watch_count": 1 }
# Simulate a Thread.sleep() # Simulate a Thread.sleep()
@ -101,5 +103,6 @@
- match: { found: true } - match: { found: true }
- do: {xpack.watcher.stats:{}} - do:
xpack.watcher.stats: {}
- match: { "watch_count": 0 } - match: { "watch_count": 0 }