Skip to content

Commit 50f7085

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 60c6582 of spec repo
1 parent 5b49812 commit 50f7085

File tree

6 files changed

+77
-28
lines changed

6 files changed

+77
-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.5.1.dev2",
7-
"regenerated": "2021-11-26 10:29:43.003956",
8-
"spec_repo_commit": "fdabc88"
7+
"regenerated": "2021-11-29 15:07:21.926609",
8+
"spec_repo_commit": "60c6582"
99
},
1010
"v2": {
1111
"apigentools_version": "1.5.1.dev2",
12-
"regenerated": "2021-11-26 10:29:43.022631",
13-
"spec_repo_commit": "fdabc88"
12+
"regenerated": "2021-11-29 15:07:21.945313",
13+
"spec_repo_commit": "60c6582"
1414
}
1515
}
1616
}

api/v1/datadog/client.go

Lines changed: 9 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v2/datadog/client.go

Lines changed: 9 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2021-11-27T20:34:41.465Z
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
interactions:
2+
- request:
3+
body: |
4+
{"date_happened":1,"tags":["test:TestPostaneventinthepastreturnsBadRequestresponse1638045281"],"text":"A text message.","title":"Test-Post_an_event_in_the_past_returns_Bad_Request_response-1638045281"}
5+
form: {}
6+
headers:
7+
Accept:
8+
- application/json, */*;q=0.8
9+
Connection:
10+
- close
11+
Content-Length:
12+
- '201'
13+
Content-Type:
14+
- application/json
15+
Host:
16+
- api.datadoghq.com
17+
User-Agent:
18+
- datadog-api-client-typescript/1.0.0-beta.6 (node 14.18.1; os Linux; arch x64)
19+
X-Datadog-Parent-Id:
20+
- '343467568446934486'
21+
X-Datadog-Trace-Id:
22+
- '4038788092229867157'
23+
method: POST
24+
url: https://api.datadoghq.com/api/v1/events
25+
response:
26+
body: '{"errors": ["Event too far in the past"]}'
27+
code: 400
28+
duration: ''
29+
headers:
30+
Connection:
31+
- close
32+
Content-Length:
33+
- '41'
34+
Content-Security-Policy:
35+
- frame-ancestors 'self'; report-uri https://api.datadoghq.com/csp-report
36+
Content-Type:
37+
- text/plain; charset=utf-8
38+
Date:
39+
- Sat, 27 Nov 2021 20:34:41 GMT
40+
Strict-Transport-Security:
41+
- max-age=15724800;
42+
X-Content-Type-Options:
43+
- nosniff
44+
X-Frame-Options:
45+
- SAMEORIGIN
46+
status: 400 Bad Request
47+
version: 1

tests/scenarios/features/v1/events.feature

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ Feature: Events
4444
When the request is sent
4545
Then the response status is 202 OK
4646

47+
Scenario: Post an event in the past returns "Bad Request" response
48+
Given new "CreateEvent" request
49+
And body with value {"title": "{{ unique }}", "text": "A text message.", "date_happened": 1, "tags": ["test:{{ unique_alnum }}"]}
50+
When the request is sent
51+
Then the response status is 400 Bad Request
52+
And the response "errors[0]" is equal to "Event too far in the past"
53+
4754
@generated @skip
4855
Scenario: Query the event stream returns "Bad Request" response
4956
Given a valid "appKeyAuth" key in the system

0 commit comments

Comments
 (0)