-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat: Add support for Docker Desktop socket locations on macOS #3378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,7 @@ | |
| DEFAULT_DOCKER_API_VERSION, | ||
| DEFAULT_MAX_POOL_SIZE, | ||
| DEFAULT_TIMEOUT_SECONDS, | ||
| DEFAULT_UNIX_SOCKET, | ||
| IS_WINDOWS_PLATFORM, | ||
| ) | ||
| from docker.utils import kwargs_from_env | ||
|
|
@@ -89,9 +90,11 @@ def test_default_pool_size_unix(self, mock_obj): | |
| client.ping() | ||
|
|
||
| base_url = f"{client.api.base_url}/v{client.api._version}/_ping" | ||
| # Extract socket path from DEFAULT_UNIX_SOCKET (remove http+unix:// prefix) | ||
| socket_path = DEFAULT_UNIX_SOCKET.replace('http+unix://', '') | ||
|
|
||
| mock_obj.assert_called_once_with(base_url, | ||
| "/var/run/docker.sock", | ||
| socket_path, | ||
| 60, | ||
|
Comment on lines
92
to
98
|
||
| maxsize=DEFAULT_MAX_POOL_SIZE | ||
| ) | ||
|
|
@@ -125,9 +128,11 @@ def test_pool_size_unix(self, mock_obj): | |
| client.ping() | ||
|
|
||
| base_url = f"{client.api.base_url}/v{client.api._version}/_ping" | ||
| # Extract socket path from DEFAULT_UNIX_SOCKET (remove http+unix:// prefix) | ||
| socket_path = DEFAULT_UNIX_SOCKET.replace('http+unix://', '') | ||
|
|
||
| mock_obj.assert_called_once_with(base_url, | ||
| "/var/run/docker.sock", | ||
| socket_path, | ||
| 60, | ||
|
Comment on lines
130
to
136
|
||
| maxsize=POOL_SIZE | ||
| ) | ||
|
|
@@ -198,9 +203,11 @@ def test_default_pool_size_from_env_unix(self, mock_obj): | |
| client.ping() | ||
|
|
||
| base_url = f"{client.api.base_url}/v{client.api._version}/_ping" | ||
| # Extract socket path from DEFAULT_UNIX_SOCKET (remove http+unix:// prefix) | ||
| socket_path = DEFAULT_UNIX_SOCKET.replace('http+unix://', '') | ||
|
|
||
| mock_obj.assert_called_once_with(base_url, | ||
| "/var/run/docker.sock", | ||
| socket_path, | ||
| 60, | ||
| maxsize=DEFAULT_MAX_POOL_SIZE | ||
| ) | ||
|
|
@@ -233,9 +240,11 @@ def test_pool_size_from_env_unix(self, mock_obj): | |
| client.ping() | ||
|
|
||
| base_url = f"{client.api.base_url}/v{client.api._version}/_ping" | ||
| # Extract socket path from DEFAULT_UNIX_SOCKET (remove http+unix:// prefix) | ||
| socket_path = DEFAULT_UNIX_SOCKET.replace('http+unix://', '') | ||
|
|
||
| mock_obj.assert_called_once_with(base_url, | ||
| "/var/run/docker.sock", | ||
| socket_path, | ||
| 60, | ||
| maxsize=POOL_SIZE | ||
| ) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.