Skip to content

Commit

Permalink
fixup! 800b45a
Browse files Browse the repository at this point in the history
Change the behavior of `ENV[k]` substitution and have values from `ENVIRONMENT`
directive take precedence over OS env vars. This gives more control over test
execution environment and explicit overrides of OS env vars.
  • Loading branch information
lavarou committed May 6, 2024
1 parent 6cf8392 commit d490be9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions daemon/internal/newrelic/integration/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ func (t *Test) subEnvVars(in []byte) []byte {
re := regexp.MustCompile("ENV\\[.*?\\]")
return re.ReplaceAllFunc(in, func(match []byte) []byte {
k := string(match[4 : len(match)-1])
v, present := os.LookupEnv(k)
v, present := t.Env[k]
if !present {
v = t.Env[k]
v = os.Getenv(k)
}
return []byte(v)
})
Expand Down

0 comments on commit d490be9

Please sign in to comment.