File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ func ApplyOverrideFuncs(config Config) {
46
46
func applyOverrideVars (config Config ) {
47
47
for k , v := range overrideVars {
48
48
if config .IsKnown (k ) {
49
- config .Set (k , v , SourceEnvVar )
49
+ config .Set (k , v , SourceAgentRuntime )
50
50
}
51
51
}
52
52
}
Original file line number Diff line number Diff line change @@ -638,6 +638,8 @@ external_config:
638
638
639
639
assert .Equal (config .GetString ("api_key" ), "overrided" , "the api key should have been overrided" )
640
640
assert .Equal (config .GetString ("dd_url" ), "https://app.datadoghq.eu" , "this shouldn't be overrided" )
641
+ assert .Equal (config .GetSource ("api_key" ), pkgconfigmodel .SourceAgentRuntime )
642
+ assert .Equal (config .GetSource ("dd_url" ), pkgconfigmodel .SourceFile )
641
643
642
644
pkgconfigmodel .AddOverrides (map [string ]interface {}{
643
645
"dd_url" : "http://localhost" ,
@@ -646,6 +648,8 @@ external_config:
646
648
647
649
assert .Equal (config .GetString ("api_key" ), "overrided" , "the api key should have been overrided" )
648
650
assert .Equal (config .GetString ("dd_url" ), "http://localhost" , "this dd_url should have been overrided" )
651
+ assert .Equal (config .GetSource ("api_key" ), pkgconfigmodel .SourceAgentRuntime )
652
+ assert .Equal (config .GetSource ("dd_url" ), pkgconfigmodel .SourceAgentRuntime )
649
653
}
650
654
651
655
func TestGetValidHostAliasesWithConfig (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments