"Fossies" - the Fresh Open Source Software Archive

Member "elasticsearch-6.8.23/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/ack_watch/10_basic.yml" (29 Dec 2021, 1542 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 "Test ack watch api":
    3   - do:
    4       cluster.health:
    5           wait_for_status: yellow
    6 
    7   - do:
    8       xpack.watcher.put_watch:
    9         id: "my_watch"
   10         master_timeout: "40s"
   11         body:  >
   12           {
   13             "trigger" : {
   14               "schedule" : { "cron" : "0 0 0 1 * ? 2099" }
   15             },
   16             "input": {
   17               "simple": {
   18                 "payload": {
   19                   "send": "yes"
   20                 }
   21               }
   22             },
   23             "condition": {
   24               "always": {}
   25             },
   26             "actions": {
   27               "test_index": {
   28                 "index": {
   29                   "index": "test",
   30                   "doc_type": "test2"
   31                 }
   32               }
   33             }
   34           }
   35 
   36   - match: { _id: "my_watch" }
   37 
   38   - do:
   39       cluster.health:
   40           wait_for_status: yellow
   41 
   42   - do:
   43       xpack.watcher.ack_watch:
   44         watch_id: "my_watch"
   45 
   46   - match: { "status.actions.test_index.ack.state" : "awaits_successful_execution" }
   47 
   48   - do:
   49       search:
   50         index: .watches
   51         body: { "query": { "term": { "_id": "my_watch" } } }
   52   - match: { hits.total: 1 }
   53   - match: { hits.hits.0._source.status.actions.test_index.ack.state: "awaits_successful_execution" }
   54 
   55   - do:
   56       xpack.watcher.delete_watch:
   57         id: "my_watch"
   58 
   59   - match: { found: true }
   60 
   61 ---
   62 "Non existent watch returns 404":
   63   - do:
   64       cluster.health:
   65           wait_for_status: yellow
   66   - do:
   67       xpack.watcher.ack_watch:
   68         watch_id: "non-existent-watch"
   69       catch: missing