Skip to content

Commit 057b5b7

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Fix update custom logs destination test for Java (#1592)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent abdeab1 commit 057b5b7

File tree

5 files changed

+32
-28
lines changed

5 files changed

+32
-28
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": "2024-04-05 17:05:16.833733",
8-
"spec_repo_commit": "9b7c8967"
7+
"regenerated": "2024-04-05 19:46:21.988400",
8+
"spec_repo_commit": "cdcf2ed6"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-04-05 17:05:16.851932",
13-
"spec_repo_commit": "9b7c8967"
12+
"regenerated": "2024-04-05 19:46:22.005901",
13+
"spec_repo_commit": "cdcf2ed6"
1414
}
1515
}
1616
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2024-03-12T09:20:18.077Z"
1+
"2024-04-05T19:31:41.540Z"

cassettes/v2/Logs-Custom-Destinations_2771509030/Update-a-custom-destination-returns-OK-response_2999162496/recording.har

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"entries": [
1010
{
11-
"_id": "da5151481b1c039579226fed534a43eb",
11+
"_id": "c89780a631afd6fc176c1e0adf003210",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
@@ -26,13 +26,13 @@
2626
"value": "application/json"
2727
}
2828
],
29-
"headersSize": 593,
29+
"headersSize": 591,
3030
"httpVersion": "HTTP/1.1",
3131
"method": "POST",
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"data\":{\"attributes\":{\"enabled\":false,\"forward_tags\":false,\"forward_tags_restriction_list\":[\"host\"],\"forward_tags_restriction_list_type\":\"BLOCK_LIST\",\"forwarder_destination\":{\"auth\":{\"password\":\"my-password\",\"type\":\"basic\",\"username\":\"my-username\"},\"endpoint\":\"https://example.com\",\"type\":\"http\"},\"name\":\"Test-Update_a_custom_destination_returns_OK_response-1710235218\",\"query\":\"source:nginx\"},\"type\":\"custom_destination\"}}"
35+
"text": "{\"data\":{\"attributes\":{\"enabled\":false,\"forward_tags\":false,\"forward_tags_restriction_list\":[\"host\"],\"forward_tags_restriction_list_type\":\"BLOCK_LIST\",\"forwarder_destination\":{\"auth\":{\"password\":\"my-password\",\"type\":\"basic\",\"username\":\"my-username\"},\"endpoint\":\"https://example.com\",\"type\":\"http\"},\"name\":\"Test-Update_a_custom_destination_returns_OK_response-1712345501\",\"query\":\"source:nginx\"},\"type\":\"custom_destination\"}}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v2/logs/config/custom-destinations"
@@ -42,7 +42,7 @@
4242
"content": {
4343
"mimeType": "application/json",
4444
"size": 419,
45-
"text": "{\"data\":{\"id\":\"22ce0782-a48f-4340-98f5-fd3671b66e19\",\"attributes\":{\"name\":\"Test-Update_a_custom_destination_returns_OK_response-1710235218\",\"query\":\"source:nginx\",\"enabled\":false,\"forwarder_destination\":{\"endpoint\":\"https://example.com\",\"auth\":{\"type\":\"basic\"},\"type\":\"http\"},\"forward_tags_restriction_list_type\":\"BLOCK_LIST\",\"forward_tags_restriction_list\":[\"host\"],\"forward_tags\":false},\"type\":\"custom_destination\"}}\n"
45+
"text": "{\"data\":{\"id\":\"60f4b01e-7853-4d48-8f6d-b98802dca889\",\"attributes\":{\"name\":\"Test-Update_a_custom_destination_returns_OK_response-1712345501\",\"query\":\"source:nginx\",\"enabled\":false,\"forwarder_destination\":{\"endpoint\":\"https://example.com\",\"auth\":{\"type\":\"basic\"},\"type\":\"http\"},\"forward_tags_restriction_list_type\":\"BLOCK_LIST\",\"forward_tags_restriction_list\":[\"host\"],\"forward_tags\":false},\"type\":\"custom_destination\"}}\n"
4646
},
4747
"cookies": [],
4848
"headers": [
@@ -51,21 +51,21 @@
5151
"value": "application/json"
5252
}
5353
],
54-
"headersSize": 684,
54+
"headersSize": 682,
5555
"httpVersion": "HTTP/1.1",
5656
"redirectURL": "",
5757
"status": 200,
5858
"statusText": "OK"
5959
},
60-
"startedDateTime": "2024-03-12T09:20:18.080Z",
61-
"time": 359
60+
"startedDateTime": "2024-04-05T19:31:41.550Z",
61+
"time": 192
6262
},
6363
{
64-
"_id": "c847e9b2927556b4a495d9314ca11a93",
64+
"_id": "cb64235b0a051c5c0de0f9e228cfc71f",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
68-
"bodySize": 127,
68+
"bodySize": 237,
6969
"cookies": [],
7070
"headers": [
7171
{
@@ -79,23 +79,23 @@
7979
"value": "application/json"
8080
}
8181
],
82-
"headersSize": 631,
82+
"headersSize": 629,
8383
"httpVersion": "HTTP/1.1",
8484
"method": "PATCH",
8585
"postData": {
8686
"mimeType": "application/json",
8787
"params": [],
88-
"text": "{\"data\":{\"attributes\":{\"name\":\"Nginx logs (Updated)\"},\"id\":\"22ce0782-a48f-4340-98f5-fd3671b66e19\",\"type\":\"custom_destination\"}}"
88+
"text": "{\"data\":{\"attributes\":{\"enabled\":false,\"forward_tags\":false,\"forward_tags_restriction_list_type\":\"BLOCK_LIST\",\"name\":\"Nginx logs (Updated)\",\"query\":\"source:nginx\"},\"id\":\"60f4b01e-7853-4d48-8f6d-b98802dca889\",\"type\":\"custom_destination\"}}"
8989
},
9090
"queryString": [],
91-
"url": "https://api.datadoghq.com/api/v2/logs/config/custom-destinations/22ce0782-a48f-4340-98f5-fd3671b66e19"
91+
"url": "https://api.datadoghq.com/api/v2/logs/config/custom-destinations/60f4b01e-7853-4d48-8f6d-b98802dca889"
9292
},
9393
"response": {
9494
"bodySize": 376,
9595
"content": {
9696
"mimeType": "application/json",
9797
"size": 376,
98-
"text": "{\"data\":{\"id\":\"22ce0782-a48f-4340-98f5-fd3671b66e19\",\"attributes\":{\"name\":\"Nginx logs (Updated)\",\"query\":\"source:nginx\",\"enabled\":false,\"forwarder_destination\":{\"endpoint\":\"https://example.com\",\"auth\":{\"type\":\"basic\"},\"type\":\"http\"},\"forward_tags_restriction_list_type\":\"BLOCK_LIST\",\"forward_tags_restriction_list\":[\"host\"],\"forward_tags\":false},\"type\":\"custom_destination\"}}\n"
98+
"text": "{\"data\":{\"id\":\"60f4b01e-7853-4d48-8f6d-b98802dca889\",\"attributes\":{\"name\":\"Nginx logs (Updated)\",\"query\":\"source:nginx\",\"enabled\":false,\"forwarder_destination\":{\"endpoint\":\"https://example.com\",\"auth\":{\"type\":\"basic\"},\"type\":\"http\"},\"forward_tags_restriction_list_type\":\"BLOCK_LIST\",\"forward_tags_restriction_list\":[\"host\"],\"forward_tags\":false},\"type\":\"custom_destination\"}}\n"
9999
},
100100
"cookies": [],
101101
"headers": [
@@ -104,17 +104,17 @@
104104
"value": "application/json"
105105
}
106106
],
107-
"headersSize": 684,
107+
"headersSize": 682,
108108
"httpVersion": "HTTP/1.1",
109109
"redirectURL": "",
110110
"status": 200,
111111
"statusText": "OK"
112112
},
113-
"startedDateTime": "2024-03-12T09:20:18.447Z",
114-
"time": 449
113+
"startedDateTime": "2024-04-05T19:31:41.751Z",
114+
"time": 145
115115
},
116116
{
117-
"_id": "8e8d48ef6c47a9a185d5b0c0f6420183",
117+
"_id": "9457227e4e461d619497d83fa4a14819",
118118
"_order": 0,
119119
"cache": {},
120120
"request": {
@@ -127,11 +127,11 @@
127127
"value": "*/*"
128128
}
129129
],
130-
"headersSize": 566,
130+
"headersSize": 564,
131131
"httpVersion": "HTTP/1.1",
132132
"method": "DELETE",
133133
"queryString": [],
134-
"url": "https://api.datadoghq.com/api/v2/logs/config/custom-destinations/22ce0782-a48f-4340-98f5-fd3671b66e19"
134+
"url": "https://api.datadoghq.com/api/v2/logs/config/custom-destinations/60f4b01e-7853-4d48-8f6d-b98802dca889"
135135
},
136136
"response": {
137137
"bodySize": 0,
@@ -146,14 +146,14 @@
146146
"value": "text/html; charset=utf-8"
147147
}
148148
],
149-
"headersSize": 671,
149+
"headersSize": 669,
150150
"httpVersion": "HTTP/1.1",
151151
"redirectURL": "",
152152
"status": 204,
153153
"statusText": "No Content"
154154
},
155-
"startedDateTime": "2024-03-12T09:20:18.906Z",
156-
"time": 434
155+
"startedDateTime": "2024-04-05T19:31:41.912Z",
156+
"time": 151
157157
}
158158
],
159159
"pages": [],

examples/v2/logs-custom-destinations/UpdateLogsCustomDestination.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ const params: v2.LogsCustomDestinationsApiUpdateLogsCustomDestinationRequest = {
1616
data: {
1717
attributes: {
1818
name: "Nginx logs (Updated)",
19+
query: "source:nginx",
20+
enabled: false,
21+
forwardTags: false,
22+
forwardTagsRestrictionListType: "BLOCK_LIST",
1923
},
2024
type: "custom_destination",
2125
id: CUSTOM_DESTINATION_DATA_ID,

features/v2/logs_custom_destinations.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ Feature: Logs Custom Destinations
226226
Given new "UpdateLogsCustomDestination" request
227227
And there is a valid "custom_destination" in the system
228228
And request contains "custom_destination_id" parameter from "custom_destination.data.id"
229-
And body with value {"data": {"attributes": {"name": "Nginx logs (Updated)"}, "type": "custom_destination", "id": "{{ custom_destination.data.id }}" }}
229+
And body with value {"data": {"attributes": {"name": "Nginx logs (Updated)", "query": "source:nginx", "enabled":false, "forward_tags":false, "forward_tags_restriction_list_type":"BLOCK_LIST"}, "type": "custom_destination", "id": "{{ custom_destination.data.id }}"}}
230230
When the request is sent
231231
Then the response status is 200 OK
232232
And the response "data.type" is equal to "custom_destination"

0 commit comments

Comments
 (0)