Skip to content

Commit 95e6dbc

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Remove on_missing_data from custom schedule monitor test (#1758)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 8d2db05 commit 95e6dbc

File tree

5 files changed

+11
-13
lines changed

5 files changed

+11
-13
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2023-11-09 22:07:32.827936",
8-
"spec_repo_commit": "893a406f"
7+
"regenerated": "2023-11-10 07:21:09.943120",
8+
"spec_repo_commit": "5d9edae7"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2023-11-09 22:07:32.841869",
13-
"spec_repo_commit": "893a406f"
12+
"regenerated": "2023-11-10 07:21:09.956411",
13+
"spec_repo_commit": "5d9edae7"
1414
}
1515
}
1616
}

examples/v1/monitors/CreateMonitor_1539578087.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
)
1717
from datadog_api_client.v1.model.monitor_thresholds import MonitorThresholds
1818
from datadog_api_client.v1.model.monitor_type import MonitorType
19-
from datadog_api_client.v1.model.on_missing_data_option import OnMissingDataOption
2019

2120
body = Monitor(
2221
message="some message Notify: @hipchat-channel",
@@ -28,7 +27,6 @@
2827
critical=0.5,
2928
),
3029
notify_audit=False,
31-
on_missing_data=OnMissingDataOption.DEFAULT,
3230
include_tags=False,
3331
scheduling_options=MonitorOptionsSchedulingOptions(
3432
evaluation_window=MonitorOptionsSchedulingOptionsEvaluationWindow(
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2023-10-04T18:33:20.272Z
1+
2023-11-09T17:58:50.774Z

tests/v1/cassettes/test_scenarios/test_create_a_metric_monitor_with_a_custom_schedule_returns_ok_response.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"message":"some message Notify: @hipchat-channel","name":"Test-Create_a_metric_monitor_with_a_custom_schedule_returns_OK_response-1696444400","options":{"include_tags":false,"notify_audit":false,"on_missing_data":"default","scheduling_options":{"custom_schedule":{"recurrences":[{"rrule":"FREQ=DAILY;INTERVAL=1","start":"2024-10-26T09:13:00","timezone":"America/Los_Angeles"}]},"evaluation_window":{"day_starts":"04:00","month_starts":1}},"thresholds":{"critical":0.5}},"query":"avg(current_1mo):avg:system.load.5{*}
3+
body: '{"message":"some message Notify: @hipchat-channel","name":"Test-Create_a_metric_monitor_with_a_custom_schedule_returns_OK_response-1699552730","options":{"include_tags":false,"notify_audit":false,"scheduling_options":{"custom_schedule":{"recurrences":[{"rrule":"FREQ=DAILY;INTERVAL=1","start":"2024-10-26T09:13:00","timezone":"America/Los_Angeles"}]},"evaluation_window":{"day_starts":"04:00","month_starts":1}},"thresholds":{"critical":0.5}},"query":"avg(current_1mo):avg:system.load.5{*}
44
> 0.5","tags":[],"type":"query alert"}'
55
headers:
66
accept:
@@ -11,9 +11,9 @@ interactions:
1111
uri: https://api.datadoghq.com/api/v1/monitor
1212
response:
1313
body:
14-
string: '{"id":132537965,"org_id":321813,"type":"query alert","name":"Test-Create_a_metric_monitor_with_a_custom_schedule_returns_OK_response-1696444400","message":"some
14+
string: '{"id":134549556,"org_id":321813,"type":"query alert","name":"Test-Create_a_metric_monitor_with_a_custom_schedule_returns_OK_response-1699552730","message":"some
1515
message Notify: @hipchat-channel","tags":[],"query":"avg(current_1mo):avg:system.load.5{*}
16-
> 0.5","options":{"include_tags":false,"notify_audit":false,"on_missing_data":"default","scheduling_options":{"custom_schedule":{"recurrences":[{"rrule":"FREQ=DAILY;INTERVAL=1","start":"2024-10-26T09:13:00","timezone":"America/Los_Angeles"}]},"evaluation_window":{"day_starts":"04:00","month_starts":1}},"thresholds":{"critical":0.5},"new_host_delay":300,"silenced":{}},"multi":false,"created_at":1696444400000,"created":"2023-10-04T18:33:20.388003+00:00","modified":"2023-10-04T18:33:20.388003+00:00","deleted":null,"restricted_roles":null,"priority":null,"overall_state_modified":null,"overall_state":"No
16+
> 0.5","options":{"include_tags":false,"notify_audit":false,"scheduling_options":{"custom_schedule":{"recurrences":[{"rrule":"FREQ=DAILY;INTERVAL=1","start":"2024-10-26T09:13:00","timezone":"America/Los_Angeles"}]},"evaluation_window":{"day_starts":"04:00","month_starts":1}},"thresholds":{"critical":0.5},"new_host_delay":300,"silenced":{}},"multi":false,"created_at":1699552731000,"created":"2023-11-09T17:58:51.118858+00:00","modified":"2023-11-09T17:58:51.118858+00:00","deleted":null,"restricted_roles":null,"priority":null,"overall_state_modified":null,"overall_state":"No
1717
Data","creator":{"name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","email":"[email protected]","id":2320499}}
1818
1919
'
@@ -29,10 +29,10 @@ interactions:
2929
accept:
3030
- application/json
3131
method: DELETE
32-
uri: https://api.datadoghq.com/api/v1/monitor/132537965
32+
uri: https://api.datadoghq.com/api/v1/monitor/134549556
3333
response:
3434
body:
35-
string: '{"deleted_monitor_id":132537965}
35+
string: '{"deleted_monitor_id":134549556}
3636
3737
'
3838
headers:

tests/v1/features/monitors.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Feature: Monitors
9494
@team:DataDog/monitor-app
9595
Scenario: Create a metric monitor with a custom schedule returns "OK" response
9696
Given new "CreateMonitor" request
97-
And body with value {"message":"some message Notify: @hipchat-channel","name":"{{ unique }}","query":"avg(current_1mo):avg:system.load.5{*} > 0.5","tags":[],"options":{"thresholds":{"critical":0.5},"notify_audit":false,"on_missing_data":"default","include_tags":false,"scheduling_options":{"evaluation_window":{"day_starts":"04:00", "month_starts":1},"custom_schedule":{"recurrences":[{"rrule":"FREQ=DAILY;INTERVAL=1","timezone":"America/Los_Angeles","start":"2024-10-26T09:13:00"}]}}},"type":"query alert"}
97+
And body with value {"message":"some message Notify: @hipchat-channel","name":"{{ unique }}","query":"avg(current_1mo):avg:system.load.5{*} > 0.5","tags":[],"options":{"thresholds":{"critical":0.5},"notify_audit":false,"include_tags":false,"scheduling_options":{"evaluation_window":{"day_starts":"04:00", "month_starts":1},"custom_schedule":{"recurrences":[{"rrule":"FREQ=DAILY;INTERVAL=1","timezone":"America/Los_Angeles","start":"2024-10-26T09:13:00"}]}}},"type":"query alert"}
9898
When the request is sent
9999
Then the response status is 200 OK
100100
And the response "name" is equal to "{{ unique }}"

0 commit comments

Comments
 (0)