-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests(alerts): add percent alerts tests (#522)
- Loading branch information
1 parent
d375ad8
commit 869906d
Showing
3 changed files
with
165 additions
and
0 deletions.
There are no files selected for viewing
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
43 changes: 43 additions & 0 deletions
43
fastly/fixtures/alerts/cleanup_alert_definition_stats_percent.yaml
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,43 @@ | ||
--- | ||
version: 1 | ||
interactions: | ||
- request: | ||
body: "" | ||
form: {} | ||
headers: | ||
User-Agent: | ||
- FastlyGo/9.2.2 (+github.com/fastly/go-fastly; go1.22.1) | ||
url: https://api.fastly.com/alerts/definitions/6v7dRqITNUwcbMoIg3UHiT | ||
method: DELETE | ||
response: | ||
body: "" | ||
headers: | ||
Accept-Ranges: | ||
- bytes | ||
Cache-Control: | ||
- no-store | ||
Date: | ||
- Tue, 16 Apr 2024 13:11:28 GMT | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- control-gateway | ||
Status: | ||
- 204 No Content | ||
Strict-Transport-Security: | ||
- max-age=31536000 | ||
Vary: | ||
- Accept-Encoding | ||
Via: | ||
- 1.1 varnish | ||
X-Cache: | ||
- MISS | ||
X-Cache-Hits: | ||
- "0" | ||
X-Served-By: | ||
- cache-yul1970048-YUL | ||
X-Timer: | ||
- S1713273088.055584,VS0,VE167 | ||
status: 204 No Content | ||
code: 204 | ||
duration: "" |
53 changes: 53 additions & 0 deletions
53
fastly/fixtures/alerts/create_alert_definition_stats_percent.yaml
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,53 @@ | ||
--- | ||
version: 1 | ||
interactions: | ||
- request: | ||
body: '{"description":"test description","dimensions":{},"evaluation_strategy":{"ignore_below":5,"period":"2m","threshold":0.1,"type":"percent_increase"},"integration_ids":[],"metric":"status_5xx","name":"test | ||
name","service_id":"7i6HN3TK9wS159v2gPAZ8A","source":"stats"}' | ||
form: {} | ||
headers: | ||
Accept: | ||
- application/json | ||
Content-Type: | ||
- application/json | ||
User-Agent: | ||
- FastlyGo/9.2.2 (+github.com/fastly/go-fastly; go1.22.1) | ||
url: https://api.fastly.com/alerts/definitions | ||
method: POST | ||
response: | ||
body: '{"id":"6v7dRqITNUwcbMoIg3UHiT","object":"definition","service_id":"7i6HN3TK9wS159v2gPAZ8A","name":"test | ||
name","description":"test description","dimensions":{},"metric":"status_5xx","source":"stats","evaluation_strategy":{"ignore_below":5,"period":"2m","threshold":0.1,"type":"percent_increase"},"integration_ids":[],"updated_at":"2024-04-16T13:11:27Z","created_at":"2024-04-16T13:11:27Z"}' | ||
headers: | ||
Accept-Ranges: | ||
- bytes | ||
Cache-Control: | ||
- no-store | ||
Content-Length: | ||
- "388" | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Tue, 16 Apr 2024 13:11:28 GMT | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- control-gateway | ||
Status: | ||
- 201 Created | ||
Strict-Transport-Security: | ||
- max-age=31536000 | ||
Vary: | ||
- Accept-Encoding | ||
Via: | ||
- 1.1 varnish | ||
X-Cache: | ||
- MISS | ||
X-Cache-Hits: | ||
- "0" | ||
X-Served-By: | ||
- cache-yul1970048-YUL | ||
X-Timer: | ||
- S1713273088.516499,VS0,VE519 | ||
status: 201 Created | ||
code: 201 | ||
duration: "" |