Skip to content

Commit

Permalink
Add assertions to BDD scenarios for V1 endpoints (#1883)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Feb 22, 2023
1 parent 4f454b0 commit d2485b3
Show file tree
Hide file tree
Showing 22 changed files with 178 additions and 113 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.4",
"regenerated": "2023-02-22 18:12:42.413887",
"spec_repo_commit": "7f9c8d81"
"regenerated": "2023-02-22 19:41:03.298967",
"spec_repo_commit": "837505a7"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2023-02-22 18:12:42.430165",
"spec_repo_commit": "7f9c8d81"
"regenerated": "2023-02-22 19:41:03.312833",
"spec_repo_commit": "837505a7"
}
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2022-01-06T00:50:23.256Z
2023-02-16T21:10:17.049Z
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
interactions:
- request:
body: |
{"name":"Test-Get_all_dashboard_lists_returns_OK_response-1676581817"}
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
method: POST
url: https://api.datadoghq.com/api/v1/dashboard/lists/manual
response:
body: '{"author":{"name":null,"handle":"frog@datadoghq.com"},"created":"2023-02-16T21:10:17.185865+00:00","dashboards":null,"dashboard_count":0,"id":364491,"is_favorite":false,"modified":"2023-02-16T21:10:17.185872+00:00","name":"Test-Get_all_dashboard_lists_returns_OK_response-1676581817","type":"manual_dashboard_list"}
'
code: 200
duration: ''
headers:
Content-Type:
- application/json
status: 200 OK
- request:
body: ''
form: {}
Expand All @@ -8,23 +29,27 @@ interactions:
method: GET
url: https://api.datadoghq.com/api/v1/dashboard/lists/manual
response:
body: '{"dashboard_lists":[{"is_favorite":true,"name":"frog''s List","dashboard_count":0,"author":{"handle":"frog@datadoghq.com","name":null},"created":"2020-09-08T07:12:57.679027+00:00","type":"manual_dashboard_list","dashboards":null,"modified":"2020-09-09T08:48:11.523877+00:00","id":126798},{"is_favorite":false,"name":"Test-Create_a_dashboard_list_returns_OK_response-1640112901","dashboard_count":0,"author":{"handle":"frog@datadoghq.com","name":null},"created":"2021-12-21T18:55:02.067838+00:00","type":"manual_dashboard_list","dashboards":null,"modified":"2021-12-21T18:55:02.067874+00:00","id":266996},{"is_favorite":false,"name":"Test-Python-Create_a_dashboard_list_returns_OK_response-1638987026","dashboard_count":0,"author":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI
Account"},"created":"2021-12-08T18:10:26.626691+00:00","type":"manual_dashboard_list","dashboards":null,"modified":"2021-12-08T18:10:26.626722+00:00","id":262166},{"is_favorite":false,"name":"Test-Python-Delete_a_dashboard_list_returns_OK_response-1638987033","dashboard_count":0,"author":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI
Account"},"created":"2021-12-08T18:10:33.174397+00:00","type":"manual_dashboard_list","dashboards":null,"modified":"2021-12-08T18:10:33.174422+00:00","id":262168},{"is_favorite":false,"name":"Test-Python-Get_a_dashboard_list_returns_OK_response-1638987029","dashboard_count":0,"author":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI
Account"},"created":"2021-12-08T18:10:29.487202+00:00","type":"manual_dashboard_list","dashboards":null,"modified":"2021-12-08T18:10:29.487230+00:00","id":262167},{"is_favorite":false,"name":"Test-Python-Update_a_dashboard_list_returns_OK_response-1638987040","dashboard_count":0,"author":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI
Account"},"created":"2021-12-08T18:10:40.138195+00:00","type":"manual_dashboard_list","dashboards":null,"modified":"2021-12-08T18:10:40.138221+00:00","id":262169},{"is_favorite":false,"name":"Test-Typescript-Create_a_dashboard_list_returns_OK_response-1640111482","dashboard_count":0,"author":{"handle":"frog@datadoghq.com","name":null},"created":"2021-12-21T18:31:22.557855+00:00","type":"manual_dashboard_list","dashboards":null,"modified":"2021-12-21T18:31:22.557886+00:00","id":266953},{"is_favorite":false,"name":"Test-Typescript-Create_a_dashboard_list_returns_OK_response-1640112717","dashboard_count":0,"author":{"handle":"frog@datadoghq.com","name":null},"created":"2021-12-21T18:51:57.727820+00:00","type":"manual_dashboard_list","dashboards":null,"modified":"2021-12-21T18:51:57.727845+00:00","id":266992},{"is_favorite":false,"name":"Test-Typescript-Create_a_dashboard_list_returns_OK_response-1640117958","dashboard_count":0,"author":{"handle":"frog@datadoghq.com","name":null},"created":"2021-12-21T20:19:18.398658+00:00","type":"manual_dashboard_list","dashboards":null,"modified":"2021-12-21T20:19:18.398694+00:00","id":267026},{"is_favorite":false,"name":"tf-TestDatadogDashListInDashboardJSON-82057-1637759559","dashboard_count":0,"author":{"handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI
Account"},"created":"2021-11-24T13:12:42.098978+00:00","type":"manual_dashboard_list","dashboards":null,"modified":"2021-11-24T13:12:42.099008+00:00","id":257787},{"is_favorite":false,"name":"updated
Test-Typescript-Update_a_dashboard_list_returns_OK_response-1637674353","dashboard_count":0,"author":{"handle":"frog@datadoghq.com","name":null},"created":"2021-11-23T13:32:34.191937+00:00","type":"manual_dashboard_list","dashboards":null,"modified":"2021-11-23T13:32:34.723130+00:00","id":257383},{"is_favorite":false,"name":"updated
Test-Update_a_dashboard_list_returns_OK_response-1633007463","dashboard_count":0,"author":{"handle":"frog@datadoghq.com","name":null},"created":"2021-09-30T13:11:04.010648+00:00","type":"manual_dashboard_list","dashboards":null,"modified":"2021-09-30T13:11:04.132209+00:00","id":240358},{"is_favorite":false,"name":"updated
Test-Update_a_dashboard_list_returns_OK_response-1633075858","dashboard_count":0,"author":{"handle":"frog@datadoghq.com","name":null},"created":"2021-10-01T08:10:58.489385+00:00","type":"manual_dashboard_list","dashboards":null,"modified":"2021-10-01T08:10:58.877699+00:00","id":240504},{"is_favorite":false,"name":"updated
Test-Update_a_dashboard_list_returns_OK_response-1633075932","dashboard_count":0,"author":{"handle":"frog@datadoghq.com","name":null},"created":"2021-10-01T08:12:12.424522+00:00","type":"manual_dashboard_list","dashboards":null,"modified":"2021-10-01T08:12:12.666891+00:00","id":240508},{"is_favorite":false,"name":"updated
Test-Update_a_dashboard_list_returns_OK_response-1637061196","dashboard_count":0,"author":{"handle":"frog@datadoghq.com","name":null},"created":"2021-11-16T11:13:21.037425+00:00","type":"manual_dashboard_list","dashboards":null,"modified":"2021-11-16T11:13:21.427449+00:00","id":255183},{"is_favorite":false,"name":"updated
Test-Update_a_dashboard_list_returns_OK_response-1637062271","dashboard_count":0,"author":{"handle":"frog@datadoghq.com","name":null},"created":"2021-11-16T11:31:14.325320+00:00","type":"manual_dashboard_list","dashboards":null,"modified":"2021-11-16T11:31:14.670076+00:00","id":255191},{"is_favorite":false,"name":"updated
Test-Update_a_dashboard_list_returns_OK_response-1637063263","dashboard_count":0,"author":{"handle":"frog@datadoghq.com","name":null},"created":"2021-11-16T11:47:45.464601+00:00","type":"manual_dashboard_list","dashboards":null,"modified":"2021-11-16T11:47:45.942232+00:00","id":255196},{"is_favorite":false,"name":"updated
Test-Update_a_dashboard_list_returns_OK_response-1637070426","dashboard_count":0,"author":{"handle":"frog@datadoghq.com","name":null},"created":"2021-11-16T13:47:09.107719+00:00","type":"manual_dashboard_list","dashboards":null,"modified":"2021-11-16T13:47:09.532441+00:00","id":255273},{"is_favorite":false,"name":"updated
Test-Update_a_dashboard_list_returns_OK_response-1637077860","dashboard_count":0,"author":{"handle":"frog@datadoghq.com","name":null},"created":"2021-11-16T15:51:01.035434+00:00","type":"manual_dashboard_list","dashboards":null,"modified":"2021-11-16T15:51:01.480129+00:00","id":255388},{"is_favorite":false,"name":"updated
Test-Update_a_dashboard_list_returns_OK_response-1637078373","dashboard_count":0,"author":{"handle":"frog@datadoghq.com","name":null},"created":"2021-11-16T15:59:34.292076+00:00","type":"manual_dashboard_list","dashboards":null,"modified":"2021-11-16T15:59:34.662062+00:00","id":255393},{"is_favorite":false,"name":"updated
Test-Update_a_dashboard_list_returns_OK_response-1637141108","dashboard_count":0,"author":{"handle":"frog@datadoghq.com","name":null},"created":"2021-11-17T09:25:11.229062+00:00","type":"manual_dashboard_list","dashboards":null,"modified":"2021-11-17T09:25:11.690913+00:00","id":255558}]}'
body: '{"dashboard_lists":[{"author":{"name":null,"handle":"frog@datadoghq.com"},"created":"2023-02-16T21:10:17.185865+00:00","dashboards":null,"dashboard_count":0,"id":364491,"is_favorite":false,"modified":"2023-02-16T21:10:17.185872+00:00","name":"Test-Get_all_dashboard_lists_returns_OK_response-1676581817","type":"manual_dashboard_list"},{"author":{"name":null,"handle":"frog@datadoghq.com"},"created":"2022-12-09T15:04:28.806069+00:00","dashboards":null,"dashboard_count":1,"id":348463,"is_favorite":false,"modified":"2022-12-09T15:04:29.985883+00:00","name":"Test-Go-TestDashboardListItemCRUD-1670598268","type":"manual_dashboard_list"}]}
'
code: 200
duration: ''
headers:
Content-Type:
- application/json
status: 200 OK
- request:
body: ''
form: {}
headers:
Accept:
- application/json
method: DELETE
url: https://api.datadoghq.com/api/v1/dashboard/lists/manual/364491
response:
body: '{"deleted_dashboard_list_id":364491}
'
code: 200
duration: ''
headers:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2022-09-12T20:05:48.730Z
2023-02-16T21:39:58.391Z
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interactions:
method: POST
url: https://api.datadoghq.com/api/v1/dashboard
response:
body: '{"notify_list":[],"description":null,"restricted_roles":[],"author_name":null,"template_variables":[{"prefix":"host","defaults":["my-host"],"available_values":["my-host","host1","host2"],"name":"host1"}],"is_read_only":false,"id":"39h-cn5-kyd","title":"","url":"/dashboard/39h-cn5-kyd/","created_at":"2022-09-12T20:05:49.753763+00:00","modified_at":"2022-09-12T20:05:49.753763+00:00","reflow_type":"auto","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"requests":{"fill":{"q":"avg:system.cpu.user{*}"}},"type":"hostmap"},"id":4911408545233424}],"layout_type":"ordered"}
body: '{"id":"h5n-j24-t82","title":"","description":null,"author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/h5n-j24-t82/","is_read_only":false,"template_variables":[{"available_values":["my-host","host1","host2"],"defaults":["my-host"],"name":"host1","prefix":"host"}],"widgets":[{"definition":{"requests":{"fill":{"q":"avg:system.cpu.user{*}"}},"type":"hostmap"},"id":355816329429238}],"notify_list":[],"created_at":"2023-02-16T21:39:58.588908+00:00","modified_at":"2023-02-16T21:39:58.588908+00:00","reflow_type":"auto","restricted_roles":[]}
'
code: 200
Expand All @@ -27,9 +27,9 @@ interactions:
Accept:
- application/json
method: DELETE
url: https://api.datadoghq.com/api/v1/dashboard/39h-cn5-kyd
url: https://api.datadoghq.com/api/v1/dashboard/h5n-j24-t82
response:
body: '{"deleted_dashboard_id":"39h-cn5-kyd"}
body: '{"deleted_dashboard_id":"h5n-j24-t82"}
'
code: 200
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2022-09-12T20:05:50.228Z
2023-02-16T21:40:06.384Z
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ interactions:
method: POST
url: https://api.datadoghq.com/api/v1/dashboard
response:
body: '{"notify_list":[],"description":null,"restricted_roles":[],"author_name":null,"template_variable_presets":[{"template_variables":[{"values":["*","my-host"],"name":"datacenter"}],"name":"my
saved view"}],"template_variables":[{"prefix":"host","defaults":["my-host"],"available_values":["my-host","host1","host2"],"name":"host1"}],"is_read_only":false,"id":"6j2-ja3-r9z","title":"","url":"/dashboard/6j2-ja3-r9z/","created_at":"2022-09-12T20:05:50.380181+00:00","modified_at":"2022-09-12T20:05:50.380181+00:00","reflow_type":"auto","author_handle":"frog@datadoghq.com","widgets":[{"definition":{"requests":{"fill":{"q":"avg:system.cpu.user{*}"}},"type":"hostmap"},"id":8337056750682432}],"layout_type":"ordered"}
body: '{"id":"y9d-w7h-s59","title":"","description":null,"author_handle":"frog@datadoghq.com","author_name":null,"layout_type":"ordered","url":"/dashboard/y9d-w7h-s59/","is_read_only":false,"template_variables":[{"available_values":["my-host","host1","host2"],"defaults":["my-host"],"name":"host1","prefix":"host"}],"widgets":[{"definition":{"requests":{"fill":{"q":"avg:system.cpu.user{*}"}},"type":"hostmap"},"id":3953978643250660}],"notify_list":[],"created_at":"2023-02-16T21:40:06.587858+00:00","modified_at":"2023-02-16T21:40:06.587858+00:00","template_variable_presets":[{"name":"my
saved view","template_variables":[{"name":"datacenter","values":["*","my-host"]}]}],"reflow_type":"auto","restricted_roles":[]}
'
code: 200
Expand All @@ -28,9 +28,9 @@ interactions:
Accept:
- application/json
method: DELETE
url: https://api.datadoghq.com/api/v1/dashboard/6j2-ja3-r9z
url: https://api.datadoghq.com/api/v1/dashboard/y9d-w7h-s59
response:
body: '{"deleted_dashboard_id":"6j2-ja3-r9z"}
body: '{"deleted_dashboard_id":"y9d-w7h-s59"}
'
code: 200
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2022-01-06T00:50:43.652Z
2023-02-16T21:47:50.042Z
Loading

0 comments on commit d2485b3

Please sign in to comment.