"Fossies" - the Fresh Open Source Software Archive 
Member "elasticsearch-6.8.23/x-pack/plugin/src/test/resources/rest-api-spec/test/watcher/delete_watch/10_basic.yml" (29 Dec 2021, 1291 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 delete 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 - do:
42 xpack.watcher.delete_watch:
43 id: "my_watch"
44 - match: { found: true }
45
46 - do:
47 search:
48 index: .watches
49 body: { "query": { "term": { "_id": "my_watch" } } }
50 - match: { hits.total: 0 }
51
52 ---
53 "Non existent watch returns 404":
54 - do:
55 cluster.health:
56 wait_for_status: yellow
57
58 - do:
59 xpack.watcher.delete_watch:
60 id: "non-existent-watch"
61 catch: missing