Skip to content

Commit

Permalink
Add test for APM create retention filter (#2241)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Oct 20, 2023
1 parent d00a620 commit 54467ff
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 5 deletions.
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": "2023-10-18 20:16:48.362230",
"spec_repo_commit": "a1e5664c"
"regenerated": "2023-10-19 13:24:06.162821",
"spec_repo_commit": "823e1cf6"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-10-18 20:16:48.376964",
"spec_repo_commit": "a1e5664c"
"regenerated": "2023-10-19 13:24:06.177267",
"spec_repo_commit": "823e1cf6"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2023-10-19T12:28:01.048Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
interactions:
- request:
body: |
{"data":{"attributes":{"enabled":true,"filter":{"query":"@http.status_code:200 service:my-service"},"filter_type":"spans-sampling-processor","name":"my retention filter","rate":1},"type":"apm_retention_filter"}}
form: {}
headers:
Accept:
- application/json
Content-Type:
- application/json
method: POST
url: https://api.datadoghq.com/api/v2/apm/config/retention-filters
response:
body: '{"data":{"id":"kkZkTzFaR_Oy4OWzOJQbcw","attributes":{"name":"my retention
filter","rate":1.0,"enabled":true,"filter_type":"spans-sampling-processor","filter":{"query":"@http.status_code:200
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"}}
'
code: 200
duration: ''
headers:
Content-Type:
- application/json
status: 200 OK
- request:
body: ''
form: {}
headers:
Accept:
- '*/*'
method: DELETE
url: https://api.datadoghq.com/api/v2/apm/config/retention-filters/kkZkTzFaR_Oy4OWzOJQbcw
response:
body: '{}
'
code: 200
duration: ''
headers:
Content-Type:
- application/json
status: 200 OK
version: 1
3 changes: 2 additions & 1 deletion tests/scenarios/features/v2/apm_retention_filters.feature
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ Feature: APM Retention Filters
When the request is sent
Then the response status is 409 Conflict

@generated @skip @team:DataDog/apm-trace-intake
@team:DataDog/apm-trace-intake
Scenario: Create a retention filter returns "OK" response
Given new "CreateApmRetentionFilter" request
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"}}
When the request is sent
Then the response status is 200 OK
And the response "data.attributes.name" is equal to "my retention filter"

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

0 comments on commit 54467ff

Please sign in to comment.