Skip to content

Commit 9faa452

Browse files
authored
tests: allow configuring smb port via env var (#314)
1 parent db185f3 commit 9faa452

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

upath/tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ def smb_container():
426426
container = "fsspec_smb"
427427
stop_docker(container)
428428
cfg = "-p -u 'testuser;testpass' -s 'home;/share;no;no;no;testuser'"
429-
port = 445
429+
port = int(os.environ.get("UPATH_TESTS_SMB_PORT", "445"))
430430
img = f"docker run --name {container} --detach -p 139:139 -p {port}:445 dperson/samba" # noqa: E231 E501
431431
cmd = f"{img} {cfg}"
432432
try:
@@ -448,7 +448,7 @@ def smb_container():
448448

449449
@pytest.fixture
450450
def smb_url(smb_container):
451-
smb_url = "smb://{username}:{password}@{host}/home/"
451+
smb_url = "smb://{username}:{password}@{host}:{port}/home/"
452452
smb_url = smb_url.format(**smb_container)
453453
return smb_url
454454

0 commit comments

Comments
 (0)