diff --git a/lib/datadog/ci/ext/transport.rb b/lib/datadog/ci/ext/transport.rb index b0956acc..4412bb13 100644 --- a/lib/datadog/ci/ext/transport.rb +++ b/lib/datadog/ci/ext/transport.rb @@ -38,6 +38,7 @@ module Transport DD_API_SETTINGS_RESPONSE_TESTS_SKIPPING_KEY = "tests_skipping" DD_API_SETTINGS_RESPONSE_REQUIRE_GIT_KEY = "require_git" DD_API_SETTINGS_RESPONSE_FLAKY_TEST_RETRIES_KEY = "flaky_test_retries_enabled" + DD_API_SETTINGS_RESPONSE_KNOWN_TESTS_ENABLED_KEY = "known_tests_enabled" DD_API_SETTINGS_RESPONSE_EARLY_FLAKE_DETECTION_KEY = "early_flake_detection" DD_API_SETTINGS_RESPONSE_ENABLED_KEY = "enabled" DD_API_SETTINGS_RESPONSE_SLOW_TEST_RETRIES_KEY = "slow_test_retries" diff --git a/lib/datadog/ci/remote/library_settings.rb b/lib/datadog/ci/remote/library_settings.rb index 61e61a5c..8ddcd35f 100644 --- a/lib/datadog/ci/remote/library_settings.rb +++ b/lib/datadog/ci/remote/library_settings.rb @@ -98,6 +98,14 @@ def early_flake_detection_enabled? ) end + def known_tests_enabled? + return @known_tests_enabled if defined?(@known_tests_enabled) + + @known_tests_enabled = Utils::Parsing.convert_to_bool( + payload.fetch(Ext::Transport::DD_API_SETTINGS_RESPONSE_KNOWN_TESTS_ENABLED_KEY, false) + ) + end + def slow_test_retries return @slow_test_retries if defined?(@slow_test_retries) diff --git a/sig/datadog/ci/ext/transport.rbs b/sig/datadog/ci/ext/transport.rbs index 7ccca67b..0a79a408 100644 --- a/sig/datadog/ci/ext/transport.rbs +++ b/sig/datadog/ci/ext/transport.rbs @@ -52,6 +52,8 @@ module Datadog DD_API_SETTINGS_RESPONSE_FLAKY_TEST_RETRIES_KEY: "flaky_test_retries_enabled" + DD_API_SETTINGS_RESPONSE_KNOWN_TESTS_ENABLED_KEY: "known_tests_enabled" + DD_API_SETTINGS_RESPONSE_EARLY_FLAKE_DETECTION_KEY: "early_flake_detection" DD_API_SETTINGS_RESPONSE_ENABLED_KEY: "enabled" diff --git a/sig/datadog/ci/remote/library_settings.rbs b/sig/datadog/ci/remote/library_settings.rbs index 9c2c676a..c99e07c1 100644 --- a/sig/datadog/ci/remote/library_settings.rbs +++ b/sig/datadog/ci/remote/library_settings.rbs @@ -11,6 +11,7 @@ module Datadog @tests_skipping_enabled: bool @flaky_test_retries_enabled: bool @early_flake_detection_enabled: bool + @known_tests_enabled: bool @slow_test_retries: Datadog::CI::Remote::SlowTestRetries @faulty_session_threshold: Integer @@ -32,6 +33,8 @@ module Datadog def early_flake_detection_enabled?: () -> bool + def known_tests_enabled?: () -> bool + def slow_test_retries: () -> Datadog::CI::Remote::SlowTestRetries def faulty_session_threshold: () -> Integer