Skip to content

Commit

Permalink
Use SetEnv For Test Package
Browse files Browse the repository at this point in the history
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
  • Loading branch information
mahadzaryab1 committed Sep 29, 2024
1 parent a8d400f commit fc249d9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions cmd/jaeger/internal/integration/e2e_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (b *Binary) Start(t *testing.T) {
func (s *E2EStorageIntegration) e2eInitialize(t *testing.T, storage string) {
// set environment variable overrides
for key, value := range s.EnvVarOverrides {
os.Setenv(key, value)
t.Setenv(key, value)
}
logger := zaptest.NewLogger(t, zaptest.WrapOptions(zap.AddCaller()))
if s.BinaryName == "" {
Expand Down Expand Up @@ -156,10 +156,6 @@ func (s *E2EStorageIntegration) e2eInitialize(t *testing.T, storage string) {
t.Cleanup(func() {
// Call e2eCleanUp to close the SpanReader and SpanWriter gRPC connection.
s.e2eCleanUp(t)
// unset environment variable overrides
for key := range s.EnvVarOverrides {
os.Unsetenv(key)
}
})
}

Expand Down

0 comments on commit fc249d9

Please sign in to comment.