Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unmute 'Test url escaping with url mustache function' webhook watcher test #50439

Merged
merged 1 commit into from
Dec 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
---
"Test url escaping with url mustache function":
- skip:
version: "all"
reason: "AwaitsFix https://github.com/elastic/elasticsearch/issues/41172"
- do:
cluster.health:
wait_for_status: yellow

- do:
index:
index: <date-index-{now/d}>
type: log
id: 1
refresh: true
body: { foo: bar }
Expand All @@ -36,10 +32,15 @@
pipeline:
description: _description
processors: [ grok: { field: host, patterns : ["%{IPORHOST:hostname}:%{NUMBER:port:int}"] } ]
docs: [ { _index: index, _type: type, _id: id, _source: { host: $host } } ]
docs: [ { _index: index, _id: id, _source: { host: $host } } ]
- set: { docs.0.doc._source.hostname: hostname }
- set: { docs.0.doc._source.port: port }

- do:
count:
index: <date-index-{now/d}>
- match: {count: 1}

- do:
watcher.put_watch:
id: "test_watch"
Expand Down Expand Up @@ -67,7 +68,7 @@
method: PUT
host: $hostname
port: $port
path: "/{{#url}}{{ctx.metadata.index}}{{/url}}/log/2"
path: "/{{#url}}{{ctx.metadata.index}}{{/url}}/_doc/2"
params:
refresh: "true"
body: "{ \"foo\": \"bar\" }"
Expand All @@ -78,6 +79,8 @@
- do:
watcher.execute_watch:
id: "test_watch"
- match: {watch_record.result.condition.met: true}
- match: {watch_record.result.actions.0.status: 'success'}

- do:
count:
Expand Down