"Fossies" - the Fresh Open Source Software Archive

Member "elasticsearch-6.8.23/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/put_watch/10_basic.yml" (29 Dec 2021, 1228 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 put 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": {
   15                 "hourly": {
   16                   "minute": [ 0, 5 ]
   17                   }
   18                 }
   19             },
   20             "input": {
   21               "simple": {
   22                 "payload": {
   23                   "send": "yes"
   24                 }
   25               }
   26             },
   27             "condition": {
   28               "always": {}
   29             },
   30             "actions": {
   31               "test_index": {
   32                 "index": {
   33                   "index": "test",
   34                   "doc_type": "test2"
   35                 }
   36               }
   37             }
   38           }
   39   - match: { _id: "my_watch" }
   40 
   41 ---
   42 "Test empty body is rejected by put watch":
   43   - do:
   44       cluster.health:
   45           wait_for_status: yellow
   46 
   47   - do:
   48       catch: bad_request
   49       xpack.watcher.put_watch:
   50         id: "my_watch"
   51   - match: { error.root_cause.0.type: "action_request_validation_exception" }
   52   - match: { error.root_cause.0.reason: "Validation Failed: 1: request body is missing;" }