Skip to content

Commit 54634ba

Browse files
vdavezclaude
andcommitted
Fix Windows CI: use a real temp file for the mutex test
`test_cli_simulate_rejects_both_modes` was passing /dev/null as a placeholder file. Click validates --payload-file with exists=True before the command body runs, so on Windows CI the test bailed with "File '/dev/null' does not exist" before ever reaching the mutual- exclusion error it was checking for. Use tmp_path to get a real existing file. macOS/Linux already passed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1ab7eba commit 54634ba

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

tests/test_webhooks_cli.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,14 @@ def test_cli_subscriptions_list() -> None:
320320
assert json.loads(result.output) == {"count": 0, "results": []}
321321

322322

323-
def test_cli_simulate_rejects_both_modes() -> None:
323+
def test_cli_simulate_rejects_both_modes(tmp_path: object) -> None:
324+
import pathlib
325+
326+
# Click validates --payload-file exists before the command body runs, so
327+
# we need a real path here. /dev/null worked on POSIX but not Windows CI.
328+
p = pathlib.Path(str(tmp_path)) / "p.json"
329+
p.write_text("{}", encoding="utf-8")
330+
324331
runner = CliRunner()
325332
result = runner.invoke(
326333
main,
@@ -332,7 +339,7 @@ def test_cli_simulate_rejects_both_modes() -> None:
332339
"--secret",
333340
"x",
334341
"--payload-file",
335-
"/dev/null",
342+
str(p),
336343
"--event-type",
337344
"entities.updated",
338345
],

0 commit comments

Comments
 (0)