Skip to content

Commit

Permalink
Allow to read pyroscope environment from env (#1029)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcl authored Jul 15, 2024
1 parent 1acee97 commit 4f782fe
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions config/testconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,15 @@ func (c *TestConfig) ReadFromEnvVar() error {
c.Pyroscope.Key = &pyroscopeKey
}

pyroscopeEnvironment := MustReadEnvVar_String(E2E_TEST_PYROSCOPE_ENVIRONMENT_ENV)
if pyroscopeEnvironment != "" {
if c.Pyroscope == nil {
c.Pyroscope = &PyroscopeConfig{}
}
logger.Info().Msgf("Using %s env var to override Pyroscope.Environment", E2E_TEST_PYROSCOPE_ENVIRONMENT_ENV)
c.Pyroscope.Environment = &pyroscopeEnvironment
}

walletKeys := ReadEnvVarGroupedMap(E2E_TEST_WALLET_KEY_ENV, E2E_TEST_WALLET_KEYS_ENV)
if len(walletKeys) > 0 {
if c.Network == nil {
Expand Down

0 comments on commit 4f782fe

Please sign in to comment.