Skip to content

Commit

Permalink
Override with env vars after overriding with test config
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcl committed Jul 4, 2024
1 parent 89f63be commit 72b33d1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions integration-tests/testconfig/testconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,6 @@ func GetConfig(configurationNames []string, product Product) (TestConfig, error)
return TestConfig{}, errors.Wrapf(err, "error reading network config")
}

logger.Info().Msg("Reading config values from environment variables")
err = testConfig.ReadConfigValuesFromEnvVars()
if err != nil {
return TestConfig{}, err
}

logger.Info().Msg("Reading configs from Base64 override env var")
configEncoded, isSet := os.LookupEnv(Base64OverrideEnvVarName)
if isSet && configEncoded != "" {
Expand All @@ -379,6 +373,12 @@ func GetConfig(configurationNames []string, product Product) (TestConfig, error)
logger.Debug().Msg("Base64 config override from environment variable not found")
}

logger.Info().Msg("Reading selected config values from environment variables")
err = testConfig.ReadConfigValuesFromEnvVars()
if err != nil {
return TestConfig{}, err
}

logger.Debug().Msg("Validating test config")
err = testConfig.Validate()
if err != nil {
Expand Down

0 comments on commit 72b33d1

Please sign in to comment.