Skip to content

Commit fb1ece4

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 2ce7f8c of spec repo
1 parent c18c050 commit fb1ece4

29 files changed

+2596
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 419 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-09-16T18:03:05.780Z

cassettes/features/v2/test_optimization/Search-flaky-tests-returns-OK-response-with-filtered-query.yml

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Search flaky tests returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.search_flaky_tests".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::TestOptimizationAPI.new
8+
9+
body = DatadogAPIClient::V2::FlakyTestsSearchRequest.new({
10+
data: DatadogAPIClient::V2::FlakyTestsSearchRequestData.new({
11+
attributes: DatadogAPIClient::V2::FlakyTestsSearchRequestAttributes.new({
12+
filter: DatadogAPIClient::V2::FlakyTestsSearchFilter.new({
13+
query: 'flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist"',
14+
}),
15+
page: DatadogAPIClient::V2::FlakyTestsSearchPageOptions.new({
16+
cursor: "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==",
17+
limit: 25,
18+
}),
19+
sort: DatadogAPIClient::V2::FlakyTestsSearchSort::FAILURE_RATE_ASCENDING,
20+
}),
21+
type: DatadogAPIClient::V2::FlakyTestsSearchRequestDataType::SEARCH_FLAKY_TESTS_REQUEST,
22+
}),
23+
})
24+
opts = {
25+
body: body,
26+
}
27+
p api_instance.search_flaky_tests(opts)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Search flaky tests returns "OK" response with pagination
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.search_flaky_tests".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::TestOptimizationAPI.new
8+
9+
body = DatadogAPIClient::V2::FlakyTestsSearchRequest.new({
10+
data: DatadogAPIClient::V2::FlakyTestsSearchRequestData.new({
11+
attributes: DatadogAPIClient::V2::FlakyTestsSearchRequestAttributes.new({
12+
filter: DatadogAPIClient::V2::FlakyTestsSearchFilter.new({
13+
query: 'flaky_test_state:active @git.repository.id_v2:"github.com/datadog/shopist"',
14+
}),
15+
page: DatadogAPIClient::V2::FlakyTestsSearchPageOptions.new({
16+
cursor: "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==",
17+
limit: 25,
18+
}),
19+
sort: DatadogAPIClient::V2::FlakyTestsSearchSort::FAILURE_RATE_ASCENDING,
20+
}),
21+
type: DatadogAPIClient::V2::FlakyTestsSearchRequestDataType::SEARCH_FLAKY_TESTS_REQUEST,
22+
}),
23+
})
24+
opts = {
25+
body: body,
26+
}
27+
api_instance.search_flaky_tests_with_pagination(opts) { |item| puts item }
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Search flaky tests returns "OK" response with filtered query
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.search_flaky_tests".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::TestOptimizationAPI.new
8+
9+
body = DatadogAPIClient::V2::FlakyTestsSearchRequest.new({
10+
data: DatadogAPIClient::V2::FlakyTestsSearchRequestData.new({
11+
attributes: DatadogAPIClient::V2::FlakyTestsSearchRequestAttributes.new({
12+
filter: DatadogAPIClient::V2::FlakyTestsSearchFilter.new({
13+
query: 'flaky_test_state:active @git.repository.id_v2:"github.com/datadog/cart-tracking"',
14+
}),
15+
page: DatadogAPIClient::V2::FlakyTestsSearchPageOptions.new({
16+
limit: 10,
17+
}),
18+
sort: DatadogAPIClient::V2::FlakyTestsSearchSort::LAST_FLAKED_DESCENDING,
19+
}),
20+
type: DatadogAPIClient::V2::FlakyTestsSearchRequestDataType::SEARCH_FLAKY_TESTS_REQUEST,
21+
}),
22+
})
23+
opts = {
24+
body: body,
25+
}
26+
api_instance.search_flaky_tests_with_pagination(opts) { |item| puts item }

features/scenarios_model_mapping.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2911,6 +2911,9 @@
29112911
"team_id" => "String",
29122912
"body" => "IncidentTeamUpdateRequest",
29132913
},
2914+
"v2.SearchFlakyTests" => {
2915+
"body" => "FlakyTestsSearchRequest",
2916+
},
29142917
"v2.SendInvitations" => {
29152918
"body" => "UserInvitationsRequest",
29162919
},
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
@endpoint(test-optimization) @endpoint(test-optimization-v2)
2+
Feature: Test Optimization
3+
Search and manage flaky tests through Test Optimization. See the [Test
4+
Optimization page](https://docs.datadoghq.com/tests/) for more
5+
information.
6+
7+
Background:
8+
Given a valid "apiKeyAuth" key in the system
9+
And a valid "appKeyAuth" key in the system
10+
And an instance of "TestOptimization" API
11+
And operation "SearchFlakyTests" enabled
12+
And new "SearchFlakyTests" request
13+
14+
@generated @skip @team:DataDog/ci-app-backend
15+
Scenario: Search flaky tests returns "Bad Request" response
16+
Given body with value {"data": {"attributes": {"filter": {"query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "failure_rate"}, "type": "search_flaky_tests_request"}}
17+
When the request is sent
18+
Then the response status is 400 Bad Request
19+
20+
@skip @team:DataDog/ci-app-backend
21+
Scenario: Search flaky tests returns "Bad Request" response with invalid limit
22+
Given body with value {"data": {"attributes": {"filter": {"query": "*"}, "page": {"limit": 2000}, "sort": "fqn"}, "type": "search_flaky_tests_request"}}
23+
When the request is sent
24+
Then the response status is 400 Bad Request
25+
26+
@generated @skip @team:DataDog/ci-app-backend
27+
Scenario: Search flaky tests returns "OK" response
28+
Given body with value {"data": {"attributes": {"filter": {"query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "failure_rate"}, "type": "search_flaky_tests_request"}}
29+
When the request is sent
30+
Then the response status is 200 OK
31+
32+
@replay-only @skip-validation @team:DataDog/ci-app-backend @with-pagination
33+
Scenario: Search flaky tests returns "OK" response with filtered query
34+
Given body with value {"data": {"attributes": {"filter": {"query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/cart-tracking\""}, "page": {"limit": 10}, "sort": "-last_flaked"}, "type": "search_flaky_tests_request"}}
35+
When the request with pagination is sent
36+
Then the response status is 200 OK
37+
38+
@generated @skip @team:DataDog/ci-app-backend @with-pagination
39+
Scenario: Search flaky tests returns "OK" response with pagination
40+
Given body with value {"data": {"attributes": {"filter": {"query": "flaky_test_state:active @git.repository.id_v2:\"github.com/datadog/shopist\""}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "failure_rate"}, "type": "search_flaky_tests_request"}}
41+
When the request with pagination is sent
42+
Then the response status is 200 OK

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3829,6 +3829,12 @@
38293829
"type": "idempotent"
38303830
}
38313831
},
3832+
"SearchFlakyTests": {
3833+
"tag": "Test Optimization",
3834+
"undo": {
3835+
"type": "safe"
3836+
}
3837+
},
38323838
"GetUsageApplicationSecurityMonitoring": {
38333839
"tag": "Usage Metering",
38343840
"undo": {

lib/datadog_api_client/configuration.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ def initialize
291291
"v2.get_incident_team": false,
292292
"v2.list_incident_teams": false,
293293
"v2.update_incident_team": false,
294+
"v2.search_flaky_tests": false,
294295
}
295296
@server_variables[:site] = ENV['DD_SITE'] if ENV.key? 'DD_SITE'
296297
@api_key['apiKeyAuth'] = ENV['DD_API_KEY'] if ENV.key? 'DD_API_KEY'

0 commit comments

Comments
 (0)