Skip to content

Commit 9a13e6a

Browse files
committed
Adapt config tests
1 parent 845062b commit 9a13e6a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tracer/test/Datadog.Trace.Tests/Configuration/Telemetry/ConfigurationBuilderTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ public IConfigurationSource GetSource(IDictionary<string, object> values)
3535
var data = new NameValueCollection();
3636
foreach (var kvp in values)
3737
{
38-
data.Add(kvp.Key, kvp.Value?.ToString());
38+
// use FormattableString.Invariant as europeans might have 1.23.ToString()=1,23 which makes tests fail
39+
data.Add(kvp.Key, kvp.Value is null ? null : FormattableString.Invariant($"{kvp.Value}"));
3940
}
4041

4142
return new NameValueConfigurationSource(data);

tracer/test/Datadog.Trace.Tests/Telemetry/ConfigurationTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ public class ConfigurationTests
5858
"DD_INSTRUMENTATION_INSTALL_TIME",
5959
"DD_INJECTION_ENABLED",
6060
"DD_INJECT_FORCE",
61+
// deprecated alias
62+
"DATADOG_TRACE_AGENT_HOSTNAME_OPTIMIZED"
6163
};
6264

6365
// These are the keys that are used in the integration registry which are _not_ sent to telemetry, so we can ignore them

0 commit comments

Comments
 (0)