"Fossies" - the Fresh Open Source Software Archive

Member "elasticsearch-6.8.23/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/get_watch/10_basic.yml" (29 Dec 2021, 1288 Bytes) of package /linux/www/elasticsearch-6.8.23-src.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Ansible YAML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 ---
    2 setup:
    3   - do:
    4       cluster.health:
    5           wait_for_status: yellow
    6 
    7 ---
    8 teardown:
    9   - do:
   10       xpack.watcher.delete_watch:
   11         id: "my_watch"
   12         ignore: 404
   13 
   14 ---
   15 "Test get watch api":
   16   - do:
   17       xpack.watcher.put_watch:
   18         id: "my_watch"
   19         body:  >
   20           {
   21             "trigger": {
   22               "schedule": {
   23                 "hourly": {
   24                   "minute": [ 0, 5 ]
   25                   }
   26                 }
   27             },
   28             "input": {
   29               "simple": {
   30                 "payload": {
   31                   "send": "yes"
   32                 }
   33               }
   34             },
   35             "condition": {
   36               "always": {}
   37             },
   38             "actions": {
   39                 "test_index": {
   40                   "index": {
   41                     "index": "test",
   42                     "doc_type": "test2"
   43                   }
   44                 }
   45               }
   46             }
   47   - match: { _id: "my_watch" }
   48   - match: { created: true }
   49 
   50   - do:
   51       search:
   52         index: .watches
   53         body: { "query": { "term": { "_id": "my_watch" } } }
   54   - match: { hits.total: 1 }
   55 
   56   - do:
   57       xpack.watcher.get_watch:
   58         id: "my_watch"
   59   - match: { found : true}
   60   - match: { _id: "my_watch" }
   61   - is_true:  watch
   62   - is_false: watch.status