Skip to content

Commit

Permalink
#4911: fixed environment integration test of tests, needed to shutdow…
Browse files Browse the repository at this point in the history
…n test during test
  • Loading branch information
sreuland committed Jul 18, 2024
1 parent 1642a1a commit 38f2b6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions services/horizon/internal/integration/parameters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
8 changes: 4 additions & 4 deletions services/horizon/internal/test/integration/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 38f2b6d

Please sign in to comment.