Skip to content

Commit cdda717

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add test for APM create retention filter (#1730)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 6032ac6 commit cdda717

File tree

4 files changed

+51
-5
lines changed

4 files changed

+51
-5
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": "2023-10-18 20:16:50.314774",
8-
"spec_repo_commit": "a1e5664c"
7+
"regenerated": "2023-10-19 13:24:13.862945",
8+
"spec_repo_commit": "823e1cf6"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2023-10-18 20:16:50.373970",
13-
"spec_repo_commit": "a1e5664c"
12+
"regenerated": "2023-10-19 13:24:13.880402",
13+
"spec_repo_commit": "823e1cf6"
1414
}
1515
}
1616
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2023-10-19T12:28:01.048Z
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
interactions:
2+
- request:
3+
body: '{"data":{"attributes":{"enabled":true,"filter":{"query":"@http.status_code:200
4+
service:my-service"},"filter_type":"spans-sampling-processor","name":"my retention
5+
filter","rate":1},"type":"apm_retention_filter"}}'
6+
headers:
7+
accept:
8+
- application/json
9+
content-type:
10+
- application/json
11+
method: POST
12+
uri: https://api.datadoghq.com/api/v2/apm/config/retention-filters
13+
response:
14+
body:
15+
string: '{"data":{"id":"kkZkTzFaR_Oy4OWzOJQbcw","attributes":{"name":"my retention
16+
filter","rate":1.0,"enabled":true,"filter_type":"spans-sampling-processor","filter":{"query":"@http.status_code:200
17+
service:my-service"},"editable":true,"modified_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","modified_at":1697718481,"created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","created_at":1697718481},"type":"apm_retention_filter"}}
18+
19+
'
20+
headers:
21+
content-type:
22+
- application/json
23+
status:
24+
code: 200
25+
message: OK
26+
- request:
27+
body: null
28+
headers:
29+
accept:
30+
- '*/*'
31+
method: DELETE
32+
uri: https://api.datadoghq.com/api/v2/apm/config/retention-filters/kkZkTzFaR_Oy4OWzOJQbcw
33+
response:
34+
body:
35+
string: '{}
36+
37+
'
38+
headers:
39+
content-type:
40+
- application/json
41+
status:
42+
code: 200
43+
message: OK
44+
version: 1

tests/v2/features/apm_retention_filters.feature

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@ Feature: APM Retention Filters
2424
When the request is sent
2525
Then the response status is 409 Conflict
2626

27-
@generated @skip @team:DataDog/apm-trace-intake
27+
@team:DataDog/apm-trace-intake
2828
Scenario: Create a retention filter returns "OK" response
2929
Given new "CreateApmRetentionFilter" request
3030
And body with value {"data": {"attributes": {"enabled": true, "filter": {"query": "@http.status_code:200 service:my-service"}, "filter_type": "spans-sampling-processor", "name": "my retention filter", "rate": 1.0}, "type": "apm_retention_filter"}}
3131
When the request is sent
3232
Then the response status is 200 OK
33+
And the response "data.attributes.name" is equal to "my retention filter"
3334

3435
@team:DataDog/apm-trace-intake
3536
Scenario: Delete a retention filter returns "Not Found" response

0 commit comments

Comments
 (0)