mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Attempted fix for too-long UDS bug in #1407
This commit is contained in:
parent
b46856391d
commit
96b1d0b7b4
1 changed files with 5 additions and 2 deletions
|
|
@ -157,8 +157,11 @@ def ds_localhost_https_server(tmp_path_factory):
|
||||||
|
|
||||||
@pytest.fixture(scope="session")
|
@pytest.fixture(scope="session")
|
||||||
def ds_unix_domain_socket_server(tmp_path_factory):
|
def ds_unix_domain_socket_server(tmp_path_factory):
|
||||||
socket_folder = tmp_path_factory.mktemp("uds")
|
# This used to use tmp_path_factory.mktemp("uds") but that turned out to
|
||||||
uds = str(socket_folder / "datasette.sock")
|
# produce paths that were too long to use as UDS on macOS, see
|
||||||
|
# https://github.com/simonw/datasette/issues/1407 - so I switched to
|
||||||
|
# using tempfile.gettempdir()
|
||||||
|
uds = str(pathlib.Path(tempfile.gettempdir()) / "datasette.sock")
|
||||||
ds_proc = subprocess.Popen(
|
ds_proc = subprocess.Popen(
|
||||||
["datasette", "--memory", "--uds", uds],
|
["datasette", "--memory", "--uds", uds],
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue