diff --git a/services/horizon/internal/integration/parameters_test.go b/services/horizon/internal/integration/parameters_test.go index 91e16ce186..bcba3164cd 100644 --- a/services/horizon/internal/integration/parameters_test.go +++ b/services/horizon/internal/integration/parameters_test.go @@ -113,6 +113,8 @@ func TestEnvironmentPreserved(t *testing.T) { envValue := os.Getenv("STELLAR_CORE_URL") assert.Equal(t, StellarCoreURL, envValue) + test.Shutdown() + envValue = os.Getenv("STELLAR_CORE_URL") assert.Equal(t, "original value", envValue) } diff --git a/services/horizon/internal/test/integration/integration.go b/services/horizon/internal/test/integration/integration.go index ca99fa4c06..9884470d70 100644 --- a/services/horizon/internal/test/integration/integration.go +++ b/services/horizon/internal/test/integration/integration.go @@ -359,10 +359,6 @@ func (i *Test) StartHorizon(startIngestProcess bool) error { }) var err error - if err = i.initializeEnvironmentVariables(); err != nil { - return err - } - // To facilitate custom runs of Horizon, we merge a default set of // parameters with the tester-supplied ones (if any). mergedWebArgs := MergeMaps(i.getDefaultWebArgs(), i.config.HorizonWebParameters) @@ -374,6 +370,10 @@ func (i *Test) StartHorizon(startIngestProcess bool) error { return err } + if err = i.initializeEnvironmentVariables(); err != nil { + return err + } + // setup Horizon web process webArgs := mapToFlags(mergedWebArgs) i.t.Log("Horizon command line webArgs:", webArgs)