Skip to content

Commit 2da0906

Browse files
committed
updating tests
1 parent b314695 commit 2da0906

File tree

1 file changed

+3
-25
lines changed

1 file changed

+3
-25
lines changed

utils/config-utils/src/test/java/datadog/trace/config/inversion/ConfigHelperTest.java

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
import java.util.List;
1313
import java.util.Map;
1414
import java.util.Set;
15+
16+
import datadog.trace.api.telemetry.ConfigInversionMetricCollectorProvider;
1517
import org.junit.jupiter.api.AfterAll;
1618
import org.junit.jupiter.api.BeforeAll;
1719
import org.junit.jupiter.api.Test;
@@ -41,6 +43,7 @@ public class ConfigHelperTest {
4143
@BeforeAll
4244
static void setUp() {
4345
// Set up test configurations using SupportedConfigurationSource
46+
// ConfigInversionMetricCollectorProvider.register(ConfigInversionMetricCollectorImpl.getInstance());
4447
Set<String> testSupported =
4548
new HashSet<>(Arrays.asList(TEST_DD_VAR, TEST_OTEL_VAR, TEST_REGULAR_VAR));
4649

@@ -118,18 +121,6 @@ void testMainConfigPrecedence() {
118121
setEnvVar(ALIAS_DD_VAR, null);
119122
}
120123

121-
@Test
122-
void testUnsupportedDDEnvironmentVariable() {
123-
setEnvVar(UNSUPPORTED_DD_VAR, "");
124-
125-
assertNull(ConfigHelper.getEnvironmentVariable(UNSUPPORTED_DD_VAR));
126-
Map<String, String> result = ConfigHelper.getEnvironmentVariables();
127-
assertFalse(result.containsKey(UNSUPPORTED_DD_VAR));
128-
129-
// Cleanup
130-
setEnvVar(UNSUPPORTED_DD_VAR, null);
131-
}
132-
133124
@Test
134125
void testNonDDAliases() {
135126
setEnvVar(NON_DD_ALIAS_VAR, NON_DD_ALIAS_VAL);
@@ -149,19 +140,6 @@ void testAliasesWithoutPresentAliases() {
149140
assertFalse(result.containsKey(ALIAS_DD_VAR));
150141
}
151142

152-
@Test
153-
void testUnsupportedButNotStrict() {
154-
ConfigHelper.setConfigInversionStrict(ConfigInversionStrictStyle.WARNING);
155-
setEnvVar(UNSUPPORTED_DD_VAR, "loose");
156-
157-
// Should fall through and return the env var even though it's unsupported
158-
assertEquals("loose", ConfigHelper.getEnvironmentVariable(UNSUPPORTED_DD_VAR));
159-
160-
// Cleanup
161-
ConfigHelper.setConfigInversionStrict(ConfigInversionStrictStyle.STRICT);
162-
setEnvVar(UNSUPPORTED_DD_VAR, null);
163-
}
164-
165143
@Test
166144
void testAliasWithEmptyList() {
167145
Map<String, List<String>> aliasMap = new HashMap<>();

0 commit comments

Comments
 (0)