fix(agent99): remove check stdin dependency
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 6m22s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled

This commit is contained in:
ogt
2026-07-14 21:43:27 +08:00
parent df88473f8b
commit af03e863cb
3 changed files with 132 additions and 42 deletions

View File

@@ -155,16 +155,19 @@ def test_sender_builds_sha256_envelope_and_streams_it_without_remote_cli_data()
assert "[Console]::In.ReadToEnd()" not in source
assert "$reader.ReadToEnd()" in source
assert "__AWOOOI_AGENT99_REMOTE_BOOTSTRAP_END_V1__" in source
assert "[Console]::In.ReadLine()" in source
assert "[Console]::In.ReadLine()" not in source
assert "[IO.File]::ReadAllLines" in source
assert '"control_command_no_stdin"' in source
assert "REMOTE_CHECK_COMMAND" in source
assert "remote_bootstrap_input_limit_exceeded" in source
assert "remote_bootstrap_sentinel_missing" in source
assert "line_width = 65536" in source
assert "len(payload_lines) > 8" in source
assert '"\\n".join(payload_lines)' in source
assert "remote_bootstrap_payload_line_contract_failed" in source
assert "$lineCount -gt 8" in source
assert "$payloadLines.Count -gt 8" in source
assert "$charCount -gt 1048576" in source
assert '<"${BOOTSTRAP_PAYLOAD_PATH}"' in source
assert '<"${BOOTSTRAP_PAYLOAD_PATH}"' not in source
assert "rawEnvelope" not in source
assert "sshpass" not in source
@@ -580,7 +583,7 @@ def test_apply_without_all_three_identities_fails_before_ssh() -> None:
assert "known_hosts_file_missing" not in result.stderr
def test_check_mode_builds_and_streams_bundle_over_bounded_fake_transport(
def test_check_mode_uses_bounded_control_command_without_ssh_stdin(
tmp_path: Path,
) -> None:
fake_bin = tmp_path / "bin"
@@ -660,8 +663,8 @@ def test_check_mode_builds_and_streams_bundle_over_bounded_fake_transport(
assert "PasswordAuthentication=no" in args
assert "Administrator@192.168.0.99" in args
assert str(identity) in args
payload_bytes = int(bytes_path.read_text(encoding="utf-8"))
assert 50_000 < payload_bytes < 1_048_576
stdin_bytes = int(bytes_path.read_text(encoding="utf-8"))
assert stdin_bytes == 0
def test_apply_uses_ephemeral_file_transport_and_cleans_up_without_ssh_stdin(