Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90580,9 +90580,6 @@ paths:
operator: OR
permissions:
- test_optimization_settings_write
x-unstable: |-
**Note**: This endpoint is in preview and may be subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
post:
description: |-
Retrieve Flaky Tests Management repository-level policies for the given repository.
Expand Down Expand Up @@ -90627,9 +90624,6 @@ paths:
operator: OR
permissions:
- test_optimization_read
x-unstable: |-
**Note**: This endpoint is in preview and may be subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/ci/test-optimization/settings/service:
delete:
description: |-
Expand Down Expand Up @@ -90673,9 +90667,6 @@ paths:
operator: OR
permissions:
- test_optimization_settings_write
x-unstable: |-
**Note**: This endpoint is in preview and may be subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
patch:
description: |-
Partially update Test Optimization settings for a specific service identified by repository, service name, and environment.
Expand Down Expand Up @@ -90729,9 +90720,6 @@ paths:
operator: OR
permissions:
- test_optimization_settings_write
x-unstable: |-
**Note**: This endpoint is in preview and may be subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
post:
description: |-
Retrieve Test Optimization settings for a specific service identified by repository, service name, and environment.
Expand Down Expand Up @@ -90778,9 +90766,6 @@ paths:
operator: OR
permissions:
- test_optimization_read
x-unstable: |-
**Note**: This endpoint is in preview and may be subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/ci/tests/analytics/aggregate:
post:
description: |-
Expand Down Expand Up @@ -132177,9 +132162,6 @@ paths:
operator: OR
permissions:
- test_optimization_write
x-unstable: |-
**Note**: This endpoint is in preview and may be subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
post:
description: |-
List endpoint returning flaky tests from Flaky Test Management. Results are paginated.
Expand Down Expand Up @@ -132246,9 +132228,6 @@ paths:
operator: OR
permissions:
- test_optimization_read
x-unstable: |-
**Note**: This endpoint is in preview and may be subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/usage/application_security:
get:
deprecated: true
Expand Down
60 changes: 20 additions & 40 deletions features/v2/test_optimization.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,48 +11,42 @@ Feature: Test Optimization

@generated @skip @team:DataDog/ci-app-backend
Scenario: Delete Test Optimization service settings returns "Bad Request" response
Given operation "DeleteTestOptimizationServiceSettings" enabled
And new "DeleteTestOptimizationServiceSettings" request
Given new "DeleteTestOptimizationServiceSettings" request
And body with value {"data": {"attributes": {"env": "prod", "repository_id": "github.com/datadog/shopist", "service_name": "shopist"}, "type": "test_optimization_delete_service_settings_request"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/ci-app-backend
Scenario: Delete Test Optimization service settings returns "No Content" response
Given operation "DeleteTestOptimizationServiceSettings" enabled
And new "DeleteTestOptimizationServiceSettings" request
Given new "DeleteTestOptimizationServiceSettings" request
And body with value {"data": {"attributes": {"env": "prod", "repository_id": "github.com/datadog/shopist", "service_name": "shopist"}, "type": "test_optimization_delete_service_settings_request"}}
When the request is sent
Then the response status is 204 No Content

@generated @skip @team:DataDog/ci-app-backend
Scenario: Delete Test Optimization service settings returns "Not Found" response
Given operation "DeleteTestOptimizationServiceSettings" enabled
And new "DeleteTestOptimizationServiceSettings" request
Given new "DeleteTestOptimizationServiceSettings" request
And body with value {"data": {"attributes": {"env": "prod", "repository_id": "github.com/datadog/shopist", "service_name": "shopist"}, "type": "test_optimization_delete_service_settings_request"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/ci-app-backend
Scenario: Get Flaky Tests Management policies returns "Bad Request" response
Given operation "GetFlakyTestsManagementPolicies" enabled
And new "GetFlakyTestsManagementPolicies" request
Given new "GetFlakyTestsManagementPolicies" request
And body with value {"data": {"attributes": {"repository_id": "github.com/datadog/shopist"}, "type": "test_optimization_get_flaky_tests_management_policies_request"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/ci-app-backend
Scenario: Get Flaky Tests Management policies returns "Not Found" response
Given operation "GetFlakyTestsManagementPolicies" enabled
And new "GetFlakyTestsManagementPolicies" request
Given new "GetFlakyTestsManagementPolicies" request
And body with value {"data": {"attributes": {"repository_id": "github.com/datadog/shopist"}, "type": "test_optimization_get_flaky_tests_management_policies_request"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/ci-app-backend
Scenario: Get Flaky Tests Management policies returns "OK" response
Given operation "GetFlakyTestsManagementPolicies" enabled
And new "GetFlakyTestsManagementPolicies" request
Given new "GetFlakyTestsManagementPolicies" request
And body with value {"data": {"attributes": {"repository_id": "github.com/datadog/shopist"}, "type": "test_optimization_get_flaky_tests_management_policies_request"}}
When the request is sent
Then the response status is 200 OK
Expand All @@ -67,24 +61,21 @@ Feature: Test Optimization

@generated @skip @team:DataDog/ci-app-backend
Scenario: Get Test Optimization service settings returns "Bad Request" response
Given operation "GetTestOptimizationServiceSettings" enabled
And new "GetTestOptimizationServiceSettings" request
Given new "GetTestOptimizationServiceSettings" request
And body with value {"data": {"attributes": {"env": "prod", "repository_id": "github.com/datadog/shopist", "service_name": "shopist"}, "type": "test_optimization_get_service_settings_request"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/ci-app-backend
Scenario: Get Test Optimization service settings returns "Not Found" response
Given operation "GetTestOptimizationServiceSettings" enabled
And new "GetTestOptimizationServiceSettings" request
Given new "GetTestOptimizationServiceSettings" request
And body with value {"data": {"attributes": {"env": "prod", "repository_id": "github.com/datadog/shopist", "service_name": "shopist"}, "type": "test_optimization_get_service_settings_request"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/ci-app-backend
Scenario: Get Test Optimization service settings returns "OK" response
Given operation "GetTestOptimizationServiceSettings" enabled
And new "GetTestOptimizationServiceSettings" request
Given new "GetTestOptimizationServiceSettings" request
And body with value {"data": {"attributes": {"env": "prod", "repository_id": "github.com/datadog/shopist", "service_name": "shopist"}, "type": "test_optimization_get_service_settings_request"}}
When the request is sent
Then the response status is 200 OK
Expand Down Expand Up @@ -115,8 +106,7 @@ Feature: Test Optimization

@generated @skip @team:DataDog/ci-app-backend
Scenario: Search flaky tests returns "Bad Request" response
Given operation "SearchFlakyTests" enabled
And new "SearchFlakyTests" request
Given new "SearchFlakyTests" request
And body with value {"data": {"attributes": {"filter": {"include_history": true, "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"}}
When the request is sent
Then the response status is 400 Bad Request
Expand All @@ -131,8 +121,7 @@ Feature: Test Optimization

@generated @skip @team:DataDog/ci-app-backend
Scenario: Search flaky tests returns "OK" response
Given operation "SearchFlakyTests" enabled
And new "SearchFlakyTests" request
Given new "SearchFlakyTests" request
And body with value {"data": {"attributes": {"filter": {"include_history": true, "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"}}
When the request is sent
Then the response status is 200 OK
Expand Down Expand Up @@ -161,32 +150,28 @@ Feature: Test Optimization

@generated @skip @team:DataDog/ci-app-backend @with-pagination
Scenario: Search flaky tests returns "OK" response with pagination
Given operation "SearchFlakyTests" enabled
And new "SearchFlakyTests" request
Given new "SearchFlakyTests" request
And body with value {"data": {"attributes": {"filter": {"include_history": true, "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"}}
When the request with pagination is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/ci-app-backend
Scenario: Update Flaky Tests Management policies returns "Bad Request" response
Given operation "UpdateFlakyTestsManagementPolicies" enabled
And new "UpdateFlakyTestsManagementPolicies" request
Given new "UpdateFlakyTestsManagementPolicies" request
And body with value {"data": {"attributes": {"attempt_to_fix": {"retries": 3}, "disabled": {"auto_disable_rule": {"enabled": false, "status": "active", "window_seconds": 3600}, "branch_rule": {"branches": ["main"], "enabled": true, "excluded_branches": [], "excluded_test_services": []}, "enabled": false, "failure_rate_rule": {"branches": [], "enabled": false, "min_runs": 10, "status": "active", "threshold": 0.5}}, "quarantined": {"auto_quarantine_rule": {"enabled": true, "window_seconds": 3600}, "branch_rule": {"branches": ["main"], "enabled": true, "excluded_branches": [], "excluded_test_services": []}, "enabled": true, "failure_rate_rule": {"branches": ["main"], "enabled": true, "min_runs": 10, "threshold": 0.5}}, "repository_id": "github.com/datadog/shopist"}, "type": "test_optimization_update_flaky_tests_management_policies_request"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/ci-app-backend
Scenario: Update Flaky Tests Management policies returns "Not Found" response
Given operation "UpdateFlakyTestsManagementPolicies" enabled
And new "UpdateFlakyTestsManagementPolicies" request
Given new "UpdateFlakyTestsManagementPolicies" request
And body with value {"data": {"attributes": {"attempt_to_fix": {"retries": 3}, "disabled": {"auto_disable_rule": {"enabled": false, "status": "active", "window_seconds": 3600}, "branch_rule": {"branches": ["main"], "enabled": true, "excluded_branches": [], "excluded_test_services": []}, "enabled": false, "failure_rate_rule": {"branches": [], "enabled": false, "min_runs": 10, "status": "active", "threshold": 0.5}}, "quarantined": {"auto_quarantine_rule": {"enabled": true, "window_seconds": 3600}, "branch_rule": {"branches": ["main"], "enabled": true, "excluded_branches": [], "excluded_test_services": []}, "enabled": true, "failure_rate_rule": {"branches": ["main"], "enabled": true, "min_runs": 10, "threshold": 0.5}}, "repository_id": "github.com/datadog/shopist"}, "type": "test_optimization_update_flaky_tests_management_policies_request"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/ci-app-backend
Scenario: Update Flaky Tests Management policies returns "OK" response
Given operation "UpdateFlakyTestsManagementPolicies" enabled
And new "UpdateFlakyTestsManagementPolicies" request
Given new "UpdateFlakyTestsManagementPolicies" request
And body with value {"data": {"attributes": {"attempt_to_fix": {"retries": 3}, "disabled": {"auto_disable_rule": {"enabled": false, "status": "active", "window_seconds": 3600}, "branch_rule": {"branches": ["main"], "enabled": true, "excluded_branches": [], "excluded_test_services": []}, "enabled": false, "failure_rate_rule": {"branches": [], "enabled": false, "min_runs": 10, "status": "active", "threshold": 0.5}}, "quarantined": {"auto_quarantine_rule": {"enabled": true, "window_seconds": 3600}, "branch_rule": {"branches": ["main"], "enabled": true, "excluded_branches": [], "excluded_test_services": []}, "enabled": true, "failure_rate_rule": {"branches": ["main"], "enabled": true, "min_runs": 10, "threshold": 0.5}}, "repository_id": "github.com/datadog/shopist"}, "type": "test_optimization_update_flaky_tests_management_policies_request"}}
When the request is sent
Then the response status is 200 OK
Expand All @@ -201,24 +186,21 @@ Feature: Test Optimization

@generated @skip @team:DataDog/ci-app-backend
Scenario: Update Test Optimization service settings returns "Bad Request" response
Given operation "UpdateTestOptimizationServiceSettings" enabled
And new "UpdateTestOptimizationServiceSettings" request
Given new "UpdateTestOptimizationServiceSettings" request
And body with value {"data": {"attributes": {"auto_test_retries_enabled": false, "code_coverage_enabled": false, "early_flake_detection_enabled": false, "env": "prod", "failed_test_replay_enabled": false, "pr_comments_enabled": true, "repository_id": "github.com/datadog/shopist", "service_name": "shopist", "test_impact_analysis_enabled": false}, "type": "test_optimization_update_service_settings_request"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/ci-app-backend
Scenario: Update Test Optimization service settings returns "Not Found" response
Given operation "UpdateTestOptimizationServiceSettings" enabled
And new "UpdateTestOptimizationServiceSettings" request
Given new "UpdateTestOptimizationServiceSettings" request
And body with value {"data": {"attributes": {"auto_test_retries_enabled": false, "code_coverage_enabled": false, "early_flake_detection_enabled": false, "env": "prod", "failed_test_replay_enabled": false, "pr_comments_enabled": true, "repository_id": "github.com/datadog/shopist", "service_name": "shopist", "test_impact_analysis_enabled": false}, "type": "test_optimization_update_service_settings_request"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/ci-app-backend
Scenario: Update Test Optimization service settings returns "OK" response
Given operation "UpdateTestOptimizationServiceSettings" enabled
And new "UpdateTestOptimizationServiceSettings" request
Given new "UpdateTestOptimizationServiceSettings" request
And body with value {"data": {"attributes": {"auto_test_retries_enabled": false, "code_coverage_enabled": false, "early_flake_detection_enabled": false, "env": "prod", "failed_test_replay_enabled": false, "pr_comments_enabled": true, "repository_id": "github.com/datadog/shopist", "service_name": "shopist", "test_impact_analysis_enabled": false}, "type": "test_optimization_update_service_settings_request"}}
When the request is sent
Then the response status is 200 OK
Expand All @@ -233,16 +215,14 @@ Feature: Test Optimization

@generated @skip @team:DataDog/ci-app-backend
Scenario: Update flaky test states returns "Bad Request" response
Given operation "UpdateFlakyTests" enabled
And new "UpdateFlakyTests" request
Given new "UpdateFlakyTests" request
And body with value {"data": {"attributes": {"tests": [{"id": "4eb1887a8adb1847", "new_state": "active"}]}, "type": "update_flaky_test_state_request"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/ci-app-backend
Scenario: Update flaky test states returns "OK" response
Given operation "UpdateFlakyTests" enabled
And new "UpdateFlakyTests" request
Given new "UpdateFlakyTests" request
And body with value {"data": {"attributes": {"tests": [{"id": "4eb1887a8adb1847", "new_state": "active"}]}, "type": "update_flaky_test_state_request"}}
When the request is sent
Then the response status is 200 OK
8 changes: 0 additions & 8 deletions services/test_optimization/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ import { TestOptimizationApiV2 } from "@datadog/datadog-api-client-test-optimiza
import { v2 } from "@datadog/datadog-api-client-test-optimization";

const configuration = createConfiguration();
// Enable unstable operations
const configurationOpts = {
unstableOperations: {
"TestOptimizationApi.v2.getFlakyTestsManagementPolicies": true
}
}

const configuration = createConfiguration(configurationOpts);
const apiInstance = new TestOptimizationApiV2(configuration);
const params = {/* parameters */};

Expand Down
Loading
Loading