Skip to content

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

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # 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:04.852679",
"spec_repo_commit": "7307da21"
"regenerated": "2025-04-11 15:22:50.416798",
"spec_repo_commit": "b50db944"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-04-11 12:59:04.868530",
"spec_repo_commit": "7307da21"
"regenerated": "2025-04-11 15:22:50.432430",
"spec_repo_commit": "b50db944"
}
}
}
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 @@ -8,11 +8,11 @@
},
"entries": [
{
"_id": "7bcfec665300989151e5e4d7e0833bd1",
"_id": "b0fe67015b6867951dd791d34fee743e",
"_order": 0,
"cache": {},
"request": {
"bodySize": 223,
"bodySize": 222,
"cookies": [],
"headers": [
{
Expand All @@ -32,17 +32,17 @@
"postData": {
"mimeType": "application/json",
"params": [],
"text": "{\"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\"}}"
"text": "{\"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\"}}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v2/incidents/config/types"
},
"response": {
"bodySize": 479,
"bodySize": 755,
"content": {
"mimeType": "application/vnd.api+json",
"size": 479,
"text": "{\"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\"}}}"
"size": 755,
"text": "{\"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}}}}"
},
"cookies": [],
"headers": [
Expand All @@ -57,11 +57,11 @@
"status": 201,
"statusText": "Created"
},
"startedDateTime": "2024-11-04T19:02:20.405Z",
"time": 97
"startedDateTime": "2025-04-09T20:37:30.104Z",
"time": 218
},
{
"_id": "ff0c00d47c22c2970055e35d911d4a47",
"_id": "f5b6e316eddc2d5776231ade11c6be62",
"_order": 0,
"cache": {},
"request": {
Expand All @@ -78,7 +78,7 @@
"httpVersion": "HTTP/1.1",
"method": "DELETE",
"queryString": [],
"url": "https://api.datadoghq.com/api/v2/incidents/config/types/6faef319-c810-435b-bdf3-57efb391e56e"
"url": "https://api.datadoghq.com/api/v2/incidents/config/types/6de50f7a-b42a-4547-8f80-08c1991cc7e7"
},
"response": {
"bodySize": 0,
Expand All @@ -94,8 +94,8 @@
"status": 204,
"statusText": "No Content"
},
"startedDateTime": "2024-11-04T19:02:20.510Z",
"time": 134
"startedDateTime": "2025-04-09T20:37:30.330Z",
"time": 74
}
],
"pages": [],
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 @@ -8,11 +8,11 @@
},
"entries": [
{
"_id": "7bcfec665300989151e5e4d7e0833bd1",
"_id": "3fd98a164d1a75de42587da6f0430ff3",
"_order": 0,
"cache": {},
"request": {
"bodySize": 223,
"bodySize": 222,
"cookies": [],
"headers": [
{
Expand All @@ -32,17 +32,17 @@
"postData": {
"mimeType": "application/json",
"params": [],
"text": "{\"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\"}}"
"text": "{\"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\"}}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v2/incidents/config/types"
},
"response": {
"bodySize": 479,
"bodySize": 755,
"content": {
"mimeType": "application/vnd.api+json",
"size": 479,
"text": "{\"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\"}}}"
"size": 755,
"text": "{\"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}}}}"
},
"cookies": [],
"headers": [
Expand All @@ -57,11 +57,11 @@
"status": 201,
"statusText": "Created"
},
"startedDateTime": "2024-11-04T19:02:22.572Z",
"time": 136
"startedDateTime": "2025-04-09T20:37:30.428Z",
"time": 149
},
{
"_id": "ee735feaf0c74690d4191605f40650b7",
"_id": "a0d57de3e50e8630146aa24f9ccbf1bb",
"_order": 0,
"cache": {},
"request": {
Expand All @@ -78,7 +78,7 @@
"httpVersion": "HTTP/1.1",
"method": "DELETE",
"queryString": [],
"url": "https://api.datadoghq.com/api/v2/incidents/config/types/dbf7f2e1-8f37-4624-9762-6e744db257aa"
"url": "https://api.datadoghq.com/api/v2/incidents/config/types/dc0ba7fa-64c9-46bd-a93d-1249070b52b6"
},
"response": {
"bodySize": 0,
Expand All @@ -94,11 +94,11 @@
"status": 204,
"statusText": "No Content"
},
"startedDateTime": "2024-11-04T19:02:22.714Z",
"startedDateTime": "2025-04-09T20:37:30.582Z",
"time": 104
},
{
"_id": "ee735feaf0c74690d4191605f40650b7",
"_id": "a0d57de3e50e8630146aa24f9ccbf1bb",
"_order": 1,
"cache": {},
"request": {
Expand All @@ -115,24 +115,30 @@
"httpVersion": "HTTP/1.1",
"method": "DELETE",
"queryString": [],
"url": "https://api.datadoghq.com/api/v2/incidents/config/types/dbf7f2e1-8f37-4624-9762-6e744db257aa"
"url": "https://api.datadoghq.com/api/v2/incidents/config/types/dc0ba7fa-64c9-46bd-a93d-1249070b52b6"
},
"response": {
"bodySize": 0,
"bodySize": 49,
"content": {
"mimeType": "text/plain",
"size": 0
"mimeType": "application/vnd.api+json",
"size": 49,
"text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}"
},
"cookies": [],
"headers": [],
"headersSize": 603,
"headers": [
{
"name": "content-type",
"value": "application/vnd.api+json"
}
],
"headersSize": 663,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 204,
"statusText": "No Content"
"status": 404,
"statusText": "Not Found"
},
"startedDateTime": "2024-11-04T19:02:22.824Z",
"time": 101
"startedDateTime": "2025-04-09T20:37:30.691Z",
"time": 63
}
],
"pages": [],
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 @@ -8,11 +8,11 @@
},
"entries": [
{
"_id": "7bcfec665300989151e5e4d7e0833bd1",
"_id": "143ed81adb66e8bb34555f298255a83a",
"_order": 0,
"cache": {},
"request": {
"bodySize": 223,
"bodySize": 222,
"cookies": [],
"headers": [
{
Expand All @@ -32,17 +32,17 @@
"postData": {
"mimeType": "application/json",
"params": [],
"text": "{\"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\"}}"
"text": "{\"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\"}}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v2/incidents/config/types"
},
"response": {
"bodySize": 477,
"bodySize": 755,
"content": {
"mimeType": "application/vnd.api+json",
"size": 477,
"text": "{\"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\"}}}"
"size": 755,
"text": "{\"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}}}}"
},
"cookies": [],
"headers": [
Expand All @@ -57,15 +57,15 @@
"status": 201,
"statusText": "Created"
},
"startedDateTime": "2024-11-04T19:02:38.665Z",
"time": 74
"startedDateTime": "2025-04-09T20:37:31.044Z",
"time": 176
},
{
"_id": "3967b7765046b074f6ea27cac459228d",
"_id": "c0ceb94c072ed6b9e5f8d001f10938c0",
"_order": 0,
"cache": {},
"request": {
"bodySize": 128,
"bodySize": 127,
"cookies": [],
"headers": [
{
Expand All @@ -79,23 +79,23 @@
"value": "application/json"
}
],
"headersSize": 613,
"headersSize": 612,
"httpVersion": "HTTP/1.1",
"method": "PATCH",
"postData": {
"mimeType": "application/json",
"params": [],
"text": "{\"data\":{\"attributes\":{\"name\":\"Security Incident-updated\"},\"id\":\"366ac7cc-9884-4a7f-a751-9d885f3136ed\",\"type\":\"incident_types\"}}"
"text": "{\"data\":{\"attributes\":{\"name\":\"fbd30183c4400dd8-updated\"},\"id\":\"b8bf5b6b-3c89-4df8-a689-ee9f4655113c\",\"type\":\"incident_types\"}}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v2/incidents/config/types/366ac7cc-9884-4a7f-a751-9d885f3136ed"
"url": "https://api.datadoghq.com/api/v2/incidents/config/types/b8bf5b6b-3c89-4df8-a689-ee9f4655113c"
},
"response": {
"bodySize": 484,
"bodySize": 757,
"content": {
"mimeType": "application/vnd.api+json",
"size": 484,
"text": "{\"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\"}}}"
"size": 757,
"text": "{\"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}}}}"
},
"cookies": [],
"headers": [
Expand All @@ -110,11 +110,11 @@
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2024-11-04T19:02:38.747Z",
"time": 81
"startedDateTime": "2025-04-09T20:37:31.225Z",
"time": 90
},
{
"_id": "406748d35f30533ee410312cbc2d6af8",
"_id": "26f151025c19bad838f4ccc53e3a26ea",
"_order": 0,
"cache": {},
"request": {
Expand All @@ -131,7 +131,7 @@
"httpVersion": "HTTP/1.1",
"method": "DELETE",
"queryString": [],
"url": "https://api.datadoghq.com/api/v2/incidents/config/types/366ac7cc-9884-4a7f-a751-9d885f3136ed"
"url": "https://api.datadoghq.com/api/v2/incidents/config/types/b8bf5b6b-3c89-4df8-a689-ee9f4655113c"
},
"response": {
"bodySize": 0,
Expand All @@ -147,8 +147,8 @@
"status": 204,
"statusText": "No Content"
},
"startedDateTime": "2024-11-04T19:02:38.834Z",
"time": 70
"startedDateTime": "2025-04-09T20:37:31.319Z",
"time": 79
}
],
"pages": [],
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/incidents/CreateIncidentType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const params: v2.IncidentsApiCreateIncidentTypeRequest = {
description:
"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.",
isDefault: false,
name: "Security Incident",
name: "8d4bbb66dccf2456",
},
type: "incident_types",
},
Expand Down
2 changes: 1 addition & 1 deletion 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 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