File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ type Config struct {
1616 FleetManagerEndpoint string `env:"FLEET_MANAGER_ENDPOINT" envDefault:"http://127.0.0.1:8000"`
1717 MetricsAddress string `env:"METRICS_ADDRESS" envDefault:":7070"`
1818 RHSSOClientID string `env:"RHSSO_SERVICE_ACCOUNT_CLIENT_ID"`
19- ProbeName string `env:"PROBE_NAME" envDefault:"${HOSTNAME}" envExpand:"true "`
19+ ProbeName string `env:"PROBE_NAME,expand " envDefault:"${HOSTNAME}"`
2020 ProbeHTTPRequestTimeout time.Duration `env:"PROBE_HTTP_REQUEST_TIMEOUT" envDefault:"5s"`
2121 ProbePollPeriod time.Duration `env:"PROBE_POLL_PERIOD" envDefault:"5s"`
2222 ProbeRunTimeout time.Duration `env:"PROBE_RUN_TIMEOUT" envDefault:"35m"`
Original file line number Diff line number Diff line change @@ -13,12 +13,14 @@ func TestGetConfig_Success(t *testing.T) {
1313 t .Setenv ("AUTH_TYPE" , "RHSSO" )
1414 t .Setenv ("RHSSO_SERVICE_ACCOUNT_CLIENT_ID" , "dummy" )
1515 t .Setenv ("RHSSO_SERVICE_ACCOUNT_CLIENT_SECRET" , "dummy" )
16+ t .Setenv ("HOSTNAME" , "hostname-dummy" )
1617
1718 cfg , err := GetConfig ()
1819
1920 require .NoError (t , err )
2021 assert .Equal (t , cfg .FleetManagerEndpoint , "http://127.0.0.1:8888" )
2122 assert .Equal (t , cfg .ProbePollPeriod , 5 * time .Second )
23+ assert .Equal (t , cfg .ProbeName , "hostname-dummy" )
2224}
2325
2426func TestGetConfig_Failure (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments