-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use interval.getStringRep for ReportingAttachment's interval (#75146)
Using getStringRep here rather than (implicitly) toString so that the interval is serialized exactly as it was provided, rather than converting to some other human readable form.
- Loading branch information
Showing
3 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
...t/resources/rest-api-spec/test/watcher/put_watch/93_put_watch_with_reporting_interval.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
setup: | ||
- do: | ||
cluster.health: | ||
wait_for_status: yellow | ||
|
||
--- | ||
"Test put watch with a reporting interval": | ||
- do: | ||
watcher.put_watch: | ||
id: "my_watch_with_reporting_interval" | ||
body: > | ||
{ | ||
"trigger": { | ||
"schedule" : { "cron" : "0 0 0 1 * ? 2099" } | ||
}, | ||
"actions": { | ||
"email_admin": { | ||
"email": { | ||
"to": "example@example.com", | ||
"subject": "Monitoring Report", | ||
"attachments": { | ||
"report_csv": { | ||
"reporting": { | ||
"url": "https://example.com", | ||
"retries": 10, | ||
"interval": "66s" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
- match: { _id: "my_watch_with_reporting_interval" } | ||
|
||
- do: | ||
watcher.get_watch: | ||
id: "my_watch_with_reporting_interval" | ||
- match: { found : true} | ||
- match: { _id: "my_watch_with_reporting_interval" } | ||
- match: { watch.actions.email_admin.email.attachments.report_csv.reporting.interval: "66s" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters