Skip to content

Commit

Permalink
Merge branch 'TT-1550-Provide-PoC-for-keeping-test-configs-in-git' in…
Browse files Browse the repository at this point in the history
…to TT-1550-automation
  • Loading branch information
anirudhwarrier committed Sep 18, 2024
2 parents f279c34 + e1bc870 commit afd3811
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-e2e-tests-reusable-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ jobs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Build Details>"
"text": "<${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}|tag: ${{ github.ref_name }}> | <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|sha: ${{ github.sha }}> | <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Details>"
}
}
]
Expand Down
24 changes: 12 additions & 12 deletions integration-tests/testconfig/testconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,18 @@ func GetConfig(configurationNames []string, product Product) (TestConfig, error)
testConfig := TestConfig{}
testConfig.ConfigurationNames = configurationNames

logger.Info().Msg("Setting env vars from testsecrets dot-env files")
err := ctf_config.LoadSecretEnvsFromFiles()
if err != nil {
return TestConfig{}, errors.Wrapf(err, "error reading test config values from ~/.testsecrets file")
}

logger.Info().Msg("Reading config values from existing env vars")
err = testConfig.ReadFromEnvVar()
if err != nil {
return TestConfig{}, errors.Wrapf(err, "error reading test config values from env vars")
}

logger.Debug().Msgf("Will apply configurations named '%s' if they are found in any of the configs", strings.Join(configurationNames, ","))

// read embedded configs is build tag "embed" is set
Expand Down Expand Up @@ -365,18 +377,6 @@ func GetConfig(configurationNames []string, product Product) (TestConfig, error)
}
}

logger.Info().Msg("Setting env vars from testsecrets dot-env files")
err := ctf_config.LoadSecretEnvsFromFiles()
if err != nil {
return TestConfig{}, errors.Wrapf(err, "error reading test config values from ~/.testsecrets file")
}

logger.Info().Msg("Reading config values from existing env vars")
err = testConfig.ReadFromEnvVar()
if err != nil {
return TestConfig{}, errors.Wrapf(err, "error reading test config values from env vars")
}

logger.Info().Msgf("Overriding config from %s env var", Base64OverrideEnvVarName)
configEncoded, isSet := os.LookupEnv(Base64OverrideEnvVarName)
if isSet && configEncoded != "" {
Expand Down

0 comments on commit afd3811

Please sign in to comment.