Skip to content

Commit

Permalink
test: Add environment variable setting for test directory
Browse files Browse the repository at this point in the history
  • Loading branch information
mattevans committed Jan 9, 2025
1 parent 87b336f commit 4a9de5c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/sidecar/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ func TestDockerService_Integration(t *testing.T) {
// Write out dummy compose file.
require.NoError(t, os.WriteFile(filepath.Join(tmpDir, "docker-compose.yml"), []byte(composeFile), 0644))

// Change working directory to our test directory so findComposeFile finds our test file.
require.NoError(t, os.Chdir(tmpDir))

t.Setenv("CONTRIBUTOOR_CONFIG_PATH", tmpDir)

// Run our tests in a real container.
t.Run("lifecycle", func(t *testing.T) {
// Ensure Start() executes as expected.
Expand Down

0 comments on commit 4a9de5c

Please sign in to comment.