Skip to content

Commit

Permalink
chore: remove unused parameters
Browse files Browse the repository at this point in the history
Remove unused parameters from private functions.
  • Loading branch information
stevenh committed Aug 8, 2024
1 parent 150a48c commit 6bdfc04
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/core/docker_host.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions internal/core/docker_host_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand All @@ -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)
})
Expand Down

0 comments on commit 6bdfc04

Please sign in to comment.