Skip to content

Commit 322db64

Browse files
authored
Unmute 'Test url escaping with url mustache function' webhook watcher test (#50439)
Some changes had to be made in order to make the test pass due to the removal or types. Added some more assertions. The failure description in this comment [0] indicates that the rest handler couldn't be found. The test passes now. I plan to merge this into master and see how CI reacts, if it handles this change well then I will also unmute this test in 7 dot x branch. Relates to #41172 0: #41172 (comment)
1 parent d414b4e commit 322db64

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

x-pack/qa/smoke-test-watcher/src/test/resources/rest-api-spec/test/mustache/50_webhook_url_escaping.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
---
22
"Test url escaping with url mustache function":
3-
- skip:
4-
version: "all"
5-
reason: "AwaitsFix https://github.com/elastic/elasticsearch/issues/41172"
63
- do:
74
cluster.health:
85
wait_for_status: yellow
96

107
- do:
118
index:
129
index: <date-index-{now/d}>
13-
type: log
1410
id: 1
1511
refresh: true
1612
body: { foo: bar }
@@ -36,10 +32,15 @@
3632
pipeline:
3733
description: _description
3834
processors: [ grok: { field: host, patterns : ["%{IPORHOST:hostname}:%{NUMBER:port:int}"] } ]
39-
docs: [ { _index: index, _type: type, _id: id, _source: { host: $host } } ]
35+
docs: [ { _index: index, _id: id, _source: { host: $host } } ]
4036
- set: { docs.0.doc._source.hostname: hostname }
4137
- set: { docs.0.doc._source.port: port }
4238

39+
- do:
40+
count:
41+
index: <date-index-{now/d}>
42+
- match: {count: 1}
43+
4344
- do:
4445
watcher.put_watch:
4546
id: "test_watch"
@@ -67,7 +68,7 @@
6768
method: PUT
6869
host: $hostname
6970
port: $port
70-
path: "/{{#url}}{{ctx.metadata.index}}{{/url}}/log/2"
71+
path: "/{{#url}}{{ctx.metadata.index}}{{/url}}/_doc/2"
7172
params:
7273
refresh: "true"
7374
body: "{ \"foo\": \"bar\" }"
@@ -78,6 +79,8 @@
7879
- do:
7980
watcher.execute_watch:
8081
id: "test_watch"
82+
- match: {watch_record.result.condition.met: true}
83+
- match: {watch_record.result.actions.0.status: 'success'}
8184

8285
- do:
8386
count:

0 commit comments

Comments
 (0)