-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathUpdateTestOptimizationServiceSettings.rb
More file actions
25 lines (23 loc) · 1.08 KB
/
Copy pathUpdateTestOptimizationServiceSettings.rb
File metadata and controls
25 lines (23 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Update Test Optimization service settings returns "OK" response
require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.update_test_optimization_service_settings".to_sym] = true
end
api_instance = DatadogAPIClient::V2::TestOptimizationAPI.new
body = DatadogAPIClient::V2::TestOptimizationUpdateServiceSettingsRequest.new({
data: DatadogAPIClient::V2::TestOptimizationUpdateServiceSettingsRequestData.new({
attributes: DatadogAPIClient::V2::TestOptimizationUpdateServiceSettingsRequestAttributes.new({
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: DatadogAPIClient::V2::TestOptimizationUpdateServiceSettingsRequestDataType::TEST_OPTIMIZATION_UPDATE_SERVICE_SETTINGS_REQUEST,
}),
})
p api_instance.update_test_optimization_service_settings(body)