File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
components/environment/src/test/java/datadog/environment Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -205,6 +205,21 @@ void testInconsistentAliasesAndAliasMapping() {
205205 setEnvVar (NEW_ALIAS_KEY_2 , null );
206206 }
207207
208+ // TODO: Update to verify telemetry when implemented
209+ @ Test
210+ void testUnsupportedEnvWarningNotInTestMode () {
211+ ConfigHelper .setConfigInversionStrict (ConfigInversionStrictStyle .TEST );
212+
213+ setEnvVar ("DD_FAKE_VAR" , "banana" );
214+
215+ // Should allow unsupported variable in TEST mode
216+ assertEquals ("banana" , ConfigHelper .getEnvironmentVariable ("DD_FAKE_VAR" ));
217+
218+ // Cleanup
219+ setEnvVar ("DD_FAKE_VAR" , null );
220+ ConfigHelper .setConfigInversionStrict (ConfigInversionStrictStyle .STRICT );
221+ }
222+
208223 // Copied from utils.TestHelper
209224 @ SuppressWarnings ("unchecked" )
210225 private static void setEnvVar (String envName , String envValue ) {
You can’t perform that action at this time.
0 commit comments