Skip to content

INA-7297: Update incident type test attributes so BDD tests use random hash for incident type name #600

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

Closed
Show file tree
Hide file tree
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
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.6",
"regenerated": "2025-04-11 12:59:10.820309",
"spec_repo_commit": "7307da21"
"regenerated": "2025-04-11 15:22:52.158010",
"spec_repo_commit": "b50db944"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-04-11 12:59:10.835773",
"spec_repo_commit": "7307da21"
"regenerated": "2025-04-11 15:22:52.173891",
"spec_repo_commit": "b50db944"
}
}
}
2 changes: 1 addition & 1 deletion examples/v2_incidents_CreateIncidentType.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async fn main() {
let body =
IncidentTypeCreateRequest::new(
IncidentTypeCreateData::new(
IncidentTypeAttributes::new("Security Incident".to_string())
IncidentTypeAttributes::new("8d4bbb66dccf2456".to_string())
.description(
"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.".to_string(),
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-11-04T19:02:20.402Z
2025-04-09T20:37:29.894Z
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"request": {
"body": {
"string": "{\"data\":{\"attributes\":{\"description\":\"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\"is_default\":false,\"name\":\"Security Incident\"},\"type\":\"incident_types\"}}",
"string": "{\"data\":{\"attributes\":{\"description\":\"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\"is_default\":false,\"name\":\"132365f074fae59b\"},\"type\":\"incident_types\"}}",
"encoding": null
},
"headers": {
Expand All @@ -19,7 +19,7 @@
},
"response": {
"body": {
"string": "{\"data\":{\"id\":\"6faef319-c810-435b-bdf3-57efb391e56e\",\"type\":\"incident_types\",\"attributes\":{\"createdAt\":\"2024-11-04T19:02:20.505437063Z\",\"createdBy\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\"is_default\":false,\"lastModifiedBy\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"modifiedAt\":\"2024-11-04T19:02:20.505437063Z\",\"name\":\"Security Incident\",\"prefix\":\"IR\"}}}",
"string": "{\"data\":{\"id\":\"6de50f7a-b42a-4547-8f80-08c1991cc7e7\",\"type\":\"incident_types\",\"attributes\":{\"createdAt\":\"2025-04-09T20:37:30.180243201Z\",\"createdBy\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"description\":\"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\"is_default\":false,\"lastModifiedBy\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"modifiedAt\":\"2025-04-09T20:37:30.180243275Z\",\"name\":\"132365f074fae59b\",\"prefix\":\"IR\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"google_meet_configuration\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"zoom_configuration\":{\"data\":null}}}}",
"encoding": null
},
"headers": {
Expand All @@ -32,7 +32,7 @@
"message": "Created"
}
},
"recorded_at": "Mon, 04 Nov 2024 19:02:20 GMT"
"recorded_at": "Wed, 09 Apr 2025 20:37:29 GMT"
},
{
"request": {
Expand All @@ -43,7 +43,7 @@
]
},
"method": "delete",
"uri": "https://api.datadoghq.com/api/v2/incidents/config/types/6faef319-c810-435b-bdf3-57efb391e56e"
"uri": "https://api.datadoghq.com/api/v2/incidents/config/types/6de50f7a-b42a-4547-8f80-08c1991cc7e7"
},
"response": {
"body": {
Expand All @@ -56,7 +56,7 @@
"message": "No Content"
}
},
"recorded_at": "Mon, 04 Nov 2024 19:02:20 GMT"
"recorded_at": "Wed, 09 Apr 2025 20:37:29 GMT"
}
],
"recorded_with": "VCR 6.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-11-04T19:02:22.569Z
2025-04-09T20:37:30.425Z
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"request": {
"body": {
"string": "{\"data\":{\"attributes\":{\"description\":\"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\"is_default\":false,\"name\":\"Security Incident\"},\"type\":\"incident_types\"}}",
"string": "{\"data\":{\"attributes\":{\"description\":\"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\"is_default\":false,\"name\":\"fa473c6f81961a61\"},\"type\":\"incident_types\"}}",
"encoding": null
},
"headers": {
Expand All @@ -19,7 +19,7 @@
},
"response": {
"body": {
"string": "{\"data\":{\"id\":\"dbf7f2e1-8f37-4624-9762-6e744db257aa\",\"type\":\"incident_types\",\"attributes\":{\"createdAt\":\"2024-11-04T19:02:22.674338166Z\",\"createdBy\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\"is_default\":false,\"lastModifiedBy\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"modifiedAt\":\"2024-11-04T19:02:22.674338166Z\",\"name\":\"Security Incident\",\"prefix\":\"IR\"}}}",
"string": "{\"data\":{\"id\":\"dc0ba7fa-64c9-46bd-a93d-1249070b52b6\",\"type\":\"incident_types\",\"attributes\":{\"createdAt\":\"2025-04-09T20:37:30.487313985Z\",\"createdBy\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"description\":\"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\"is_default\":false,\"lastModifiedBy\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"modifiedAt\":\"2025-04-09T20:37:30.487314108Z\",\"name\":\"fa473c6f81961a61\",\"prefix\":\"IR\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"google_meet_configuration\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"zoom_configuration\":{\"data\":null}}}}",
"encoding": null
},
"headers": {
Expand All @@ -32,7 +32,7 @@
"message": "Created"
}
},
"recorded_at": "Mon, 04 Nov 2024 19:02:22 GMT"
"recorded_at": "Wed, 09 Apr 2025 20:37:30 GMT"
},
{
"request": {
Expand All @@ -43,7 +43,7 @@
]
},
"method": "delete",
"uri": "https://api.datadoghq.com/api/v2/incidents/config/types/dbf7f2e1-8f37-4624-9762-6e744db257aa"
"uri": "https://api.datadoghq.com/api/v2/incidents/config/types/dc0ba7fa-64c9-46bd-a93d-1249070b52b6"
},
"response": {
"body": {
Expand All @@ -56,7 +56,7 @@
"message": "No Content"
}
},
"recorded_at": "Mon, 04 Nov 2024 19:02:22 GMT"
"recorded_at": "Wed, 09 Apr 2025 20:37:30 GMT"
},
{
"request": {
Expand All @@ -67,20 +67,24 @@
]
},
"method": "delete",
"uri": "https://api.datadoghq.com/api/v2/incidents/config/types/dbf7f2e1-8f37-4624-9762-6e744db257aa"
"uri": "https://api.datadoghq.com/api/v2/incidents/config/types/dc0ba7fa-64c9-46bd-a93d-1249070b52b6"
},
"response": {
"body": {
"string": "",
"string": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}",
"encoding": null
},
"headers": {},
"headers": {
"Content-Type": [
"application/vnd.api+json"
]
},
"status": {
"code": 204,
"message": "No Content"
"code": 404,
"message": "Not Found"
}
},
"recorded_at": "Mon, 04 Nov 2024 19:02:22 GMT"
"recorded_at": "Wed, 09 Apr 2025 20:37:30 GMT"
}
],
"recorded_with": "VCR 6.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-11-04T19:02:38.662Z
2025-04-09T20:37:30.806Z
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"request": {
"body": {
"string": "{\"data\":{\"attributes\":{\"description\":\"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\"is_default\":false,\"name\":\"Security Incident\"},\"type\":\"incident_types\"}}",
"string": "{\"data\":{\"attributes\":{\"description\":\"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\"is_default\":false,\"name\":\"fbd30183c4400dd8\"},\"type\":\"incident_types\"}}",
"encoding": null
},
"headers": {
Expand All @@ -19,7 +19,7 @@
},
"response": {
"body": {
"string": "{\"data\":{\"id\":\"366ac7cc-9884-4a7f-a751-9d885f3136ed\",\"type\":\"incident_types\",\"attributes\":{\"createdAt\":\"2024-11-04T19:02:38.74682603Z\",\"createdBy\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\"is_default\":false,\"lastModifiedBy\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"modifiedAt\":\"2024-11-04T19:02:38.74682603Z\",\"name\":\"Security Incident\",\"prefix\":\"IR\"}}}",
"string": "{\"data\":{\"id\":\"b8bf5b6b-3c89-4df8-a689-ee9f4655113c\",\"type\":\"incident_types\",\"attributes\":{\"createdAt\":\"2025-04-09T20:37:31.105820953Z\",\"createdBy\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"description\":\"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\"is_default\":false,\"lastModifiedBy\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"modifiedAt\":\"2025-04-09T20:37:31.105821027Z\",\"name\":\"fbd30183c4400dd8\",\"prefix\":\"IR\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"google_meet_configuration\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"zoom_configuration\":{\"data\":null}}}}",
"encoding": null
},
"headers": {
Expand All @@ -32,12 +32,12 @@
"message": "Created"
}
},
"recorded_at": "Mon, 04 Nov 2024 19:02:38 GMT"
"recorded_at": "Wed, 09 Apr 2025 20:37:30 GMT"
},
{
"request": {
"body": {
"string": "{\"data\":{\"attributes\":{\"name\":\"Security Incident-updated\"},\"id\":\"366ac7cc-9884-4a7f-a751-9d885f3136ed\",\"type\":\"incident_types\"}}",
"string": "{\"data\":{\"attributes\":{\"name\":\"fbd30183c4400dd8-updated\"},\"id\":\"b8bf5b6b-3c89-4df8-a689-ee9f4655113c\",\"type\":\"incident_types\"}}",
"encoding": null
},
"headers": {
Expand All @@ -49,11 +49,11 @@
]
},
"method": "patch",
"uri": "https://api.datadoghq.com/api/v2/incidents/config/types/366ac7cc-9884-4a7f-a751-9d885f3136ed"
"uri": "https://api.datadoghq.com/api/v2/incidents/config/types/b8bf5b6b-3c89-4df8-a689-ee9f4655113c"
},
"response": {
"body": {
"string": "{\"data\":{\"id\":\"366ac7cc-9884-4a7f-a751-9d885f3136ed\",\"type\":\"incident_types\",\"attributes\":{\"createdAt\":\"2024-11-04T19:02:38.746826Z\",\"createdBy\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\"is_default\":false,\"lastModifiedBy\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"modifiedAt\":\"2024-11-04T19:02:38.837509595Z\",\"name\":\"Security Incident-updated\",\"prefix\":\"IR\"}}}",
"string": "{\"data\":{\"id\":\"b8bf5b6b-3c89-4df8-a689-ee9f4655113c\",\"type\":\"incident_types\",\"attributes\":{\"createdAt\":\"2025-04-09T20:37:31.105821Z\",\"createdBy\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"description\":\"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\"is_default\":false,\"lastModifiedBy\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"modifiedAt\":\"2025-04-09T20:37:31.295207Z\",\"name\":\"fbd30183c4400dd8-updated\",\"prefix\":\"IR\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"google_meet_configuration\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"zoom_configuration\":{\"data\":null}}}}",
"encoding": null
},
"headers": {
Expand All @@ -66,7 +66,7 @@
"message": "OK"
}
},
"recorded_at": "Mon, 04 Nov 2024 19:02:38 GMT"
"recorded_at": "Wed, 09 Apr 2025 20:37:30 GMT"
},
{
"request": {
Expand All @@ -77,7 +77,7 @@
]
},
"method": "delete",
"uri": "https://api.datadoghq.com/api/v2/incidents/config/types/366ac7cc-9884-4a7f-a751-9d885f3136ed"
"uri": "https://api.datadoghq.com/api/v2/incidents/config/types/b8bf5b6b-3c89-4df8-a689-ee9f4655113c"
},
"response": {
"body": {
Expand All @@ -90,7 +90,7 @@
"message": "No Content"
}
},
"recorded_at": "Mon, 04 Nov 2024 19:02:38 GMT"
"recorded_at": "Wed, 09 Apr 2025 20:37:30 GMT"
}
],
"recorded_with": "VCR 6.0.0"
Expand Down
2 changes: 1 addition & 1 deletion tests/scenarios/features/v2/given.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
"parameters": [
{
"name": "body",
"value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"Security Incident\",\n \"description\": \"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\n \"is_default\": false\n },\n \"type\": \"incident_types\"\n }\n}"
"value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"{{ unique_hash }}\",\n \"description\": \"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\n \"is_default\": false\n },\n \"type\": \"incident_types\"\n }\n}"
}
],
"step": "there is a valid \"incident_type\" in the system",
Expand Down
2 changes: 1 addition & 1 deletion tests/scenarios/features/v2/incidents.feature
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Feature: Incidents
Scenario: Create an incident type returns "CREATED" response
Given operation "CreateIncidentType" enabled
And new "CreateIncidentType" request
And body with value {"data": {"attributes": {"description": "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.", "is_default": false, "name": "Security Incident"}, "type": "incident_types"}}
And body with value {"data": {"attributes": {"description": "Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.", "is_default": false, "name": "{{ unique_hash }}"}, "type": "incident_types"}}
When the request is sent
Then the response status is 201 CREATED

Expand Down