Skip to content

Commit 0a2b76d

Browse files
committed
test(update): qualify download retries on native Windows
Signed-off-by: BigDataDZ <76271875+BigDataDZ@users.noreply.github.com>
1 parent 860e42d commit 0a2b76d

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎.github/workflows/python-tests.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,7 @@ jobs:
819819
tests/control_plane/test_effect_runtime_integration.py
820820
tests/control_plane/test_shadow_observation_retirement.py
821821
tests/test_self_update_runtime_activation.py
822+
tests/test_self_update_download.py
822823
tests/test_windows_atomic_writes.py
823824
tests/test_windows_install.py
824825

‎tests/test_self_update_download.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import subprocess
23
from pathlib import Path
34

@@ -19,7 +20,10 @@ def run(args, **kwargs):
1920
if args[0] == "curl":
2021
script = Path(args[args.index("--output") + 1])
2122
assert script.read_bytes() == b""
22-
assert script.stat().st_mode & 0o777 == 0o600
23+
# Windows does not expose POSIX owner-only permission bits. Keep
24+
# that assertion on POSIX; partial-byte and retry checks run on both.
25+
if os.name != "nt":
26+
assert script.stat().st_mode & 0o777 == 0o600
2327
if len(calls) == 1:
2428
script.write_text("echo PARTIAL_SECRET")
2529
return subprocess.CompletedProcess(

0 commit comments

Comments
 (0)