fix(reboot): accept windows verifier crlf markers
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 1m2s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
AWOOOI Harbor 110 Local Repair / workflow-shape (push) Successful in 0s
AWOOOI Harbor 110 Local Repair / harbor-110-local-repair (push) Successful in 9s
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 1m2s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
AWOOOI Harbor 110 Local Repair / workflow-shape (push) Successful in 0s
AWOOOI Harbor 110 Local Repair / harbor-110-local-repair (push) Successful in 9s
This commit is contained in:
@@ -294,3 +294,39 @@ def test_collect_mode_rejects_success_exit_without_verify_marker(tmp_path: Path)
|
||||
assert values["remote_verify_exit_status"] == "0"
|
||||
assert values["verify_collection_status"] == "blocked_remote_verify_output_invalid"
|
||||
assert "AWOOOI_WINDOWS99_VMWARE_AUTOSTART=1" not in result.stdout
|
||||
|
||||
|
||||
def test_collect_mode_accepts_windows_crlf_verify_markers(tmp_path: Path) -> None:
|
||||
fake_bin = tmp_path / "bin"
|
||||
fake_bin.mkdir()
|
||||
_write_executable(
|
||||
fake_bin / "nc",
|
||||
"""
|
||||
#!/usr/bin/env bash
|
||||
exit 0
|
||||
""",
|
||||
)
|
||||
_write_executable(
|
||||
fake_bin / "ssh",
|
||||
"""
|
||||
#!/usr/bin/env bash
|
||||
args="$*"
|
||||
if [[ "$args" == *"powershell"* ]]; then
|
||||
printf 'AWOOOI_WINDOWS99_VMWARE_AUTOSTART=1\\r\\n'
|
||||
printf 'MODE=Verify\\r\\n'
|
||||
printf 'VMRUN_PRESENT=1\\r\\n'
|
||||
printf 'VMWARE_AUTOSTART_VERIFY_READY=0\\r\\n'
|
||||
exit 0
|
||||
fi
|
||||
printf '%s\n' 'AWOOOI_WINDOWS99_SSH_READY'
|
||||
exit 0
|
||||
""",
|
||||
)
|
||||
|
||||
result = _run_collector(fake_bin, "--collect")
|
||||
|
||||
assert result.returncode == 0
|
||||
values = _key_values(result.stdout)
|
||||
assert values["verify_collection_status"] == "collected_windows99_vmware_verify_stdout"
|
||||
assert "AWOOOI_WINDOWS99_VMWARE_AUTOSTART=1\r" not in result.stdout
|
||||
assert "VMWARE_AUTOSTART_VERIFY_READY=0" in result.stdout
|
||||
|
||||
Reference in New Issue
Block a user