Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

chore: remove unused parameters #2721

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/core/docker_host.go
Original file line number Diff line number Diff line change
@@ -160,7 +160,7 @@ func extractDockerSocketFromClient(ctx context.Context, cli client.APIClient) st
return checkDockerSocketFn(tcHost)
}

testcontainersDockerSocket, err := dockerSocketOverridePath(ctx)
testcontainersDockerSocket, err := dockerSocketOverridePath()
if err == nil {
return checkDockerSocketFn(testcontainersDockerSocket)
}
@@ -220,7 +220,7 @@ func dockerHostFromProperties(ctx context.Context) (string, error) {

// dockerSocketOverridePath returns the docker socket from the TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE environment variable,
// if it's not empty
func dockerSocketOverridePath(ctx context.Context) (string, error) {
func dockerSocketOverridePath() (string, error) {
if dockerHostPath, exists := os.LookupEnv("TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE"); exists {
return dockerHostPath, nil
}
4 changes: 2 additions & 2 deletions internal/core/docker_host_test.go
Original file line number Diff line number Diff line change
@@ -189,7 +189,7 @@ func TestExtractDockerHost(t *testing.T) {
err := createTmpDockerSocket(tmpDir)
require.NoError(t, err)

socket, err := dockerSocketOverridePath(context.Background())
socket, err := dockerSocketOverridePath()
require.NoError(t, err)
assert.Equal(t, tmpSocket, socket)
})
@@ -199,7 +199,7 @@ func TestExtractDockerHost(t *testing.T) {

os.Unsetenv("TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE")

socket, err := dockerSocketOverridePath(context.Background())
socket, err := dockerSocketOverridePath()
require.ErrorIs(t, err, ErrDockerSocketOverrideNotSet)
assert.Empty(t, socket)
})