2015-04-06 11:29:36 -04:00
|
|
|
---
|
|
|
|
"Test get watch api":
|
|
|
|
- do:
|
|
|
|
cluster.health:
|
|
|
|
wait_for_status: green
|
|
|
|
|
|
|
|
- do:
|
2015-04-28 19:08:28 -04:00
|
|
|
watcher.put_watch:
|
2015-04-06 11:29:36 -04:00
|
|
|
id: "my_watch"
|
|
|
|
body: >
|
|
|
|
{
|
|
|
|
"trigger": {
|
|
|
|
"schedule": {
|
|
|
|
"hourly": {
|
|
|
|
"minute": [ 0, 5 ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"input": {
|
|
|
|
"simple": {
|
|
|
|
"payload": {
|
|
|
|
"send": "yes"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"condition": {
|
2015-04-27 09:33:23 -04:00
|
|
|
"always": {}
|
2015-04-06 11:29:36 -04:00
|
|
|
},
|
2015-05-04 20:37:16 -04:00
|
|
|
"actions": {
|
2015-04-17 15:57:34 -04:00
|
|
|
"test_index": {
|
|
|
|
"index": {
|
|
|
|
"index": "test",
|
2015-04-27 09:33:23 -04:00
|
|
|
"doc_type": "test2"
|
2015-04-17 15:57:34 -04:00
|
|
|
}
|
2015-04-06 11:29:36 -04:00
|
|
|
}
|
|
|
|
}
|
2015-05-04 20:37:16 -04:00
|
|
|
}
|
2015-04-06 11:29:36 -04:00
|
|
|
- match: { _id: "my_watch" }
|
|
|
|
- match: { created: true }
|
|
|
|
|
|
|
|
- do:
|
2015-04-28 19:08:28 -04:00
|
|
|
watcher.get_watch:
|
2015-04-06 11:29:36 -04:00
|
|
|
id: "my_watch"
|
|
|
|
- match: { found : true}
|
|
|
|
- match: { _id: "my_watch" }
|
2015-06-23 08:28:57 -04:00
|
|
|
- match: { _status.version: 1 }
|
|
|
|
- is_false: watch.status
|