Publish curated Unraid-AppOps-Gateway source from b6d6a3e1657000c6e0a482c8056a3fbebbafd711

This commit is contained in:
Public Source Publisher committed 2026-10-09 15:30:32 +00:00
1 parent 2d50064a8f
commit d825f5045d
11 files changed
+438 -43

No files matched your search

@@ -95,6 +95,7 @@ def _install_fake_docker(
"if behavior == 'echo-received':\n"
" os.write(2, first.encode() + b'\\n')\n"
"if behavior == 'exit-after-first':\n"
" open(marker, 'a').write('first-input-validated\\n')\n"
" raise SystemExit(8)\n"
"os.write(2, b'Enter it again: ')\n"
"second = sys.stdin.readline().rstrip('\\r\\n')\n"
@@ -288,7 +289,8 @@ def test_any_password_input_without_success_becomes_unknown(
states, calls, journal = _journal(
{module.RUNTIME_ROLE: "pending", module.MIGRATOR_ROLE: "pending"}
)
monkeypatch.setattr(module, "PROMPT_TIMEOUT_SECONDS", 0.15)
# Prove the post-input branch, rather than timing out Python startup under load.
monkeypatch.setattr(module, "PROMPT_TIMEOUT_SECONDS", 2.0)
monkeypatch.setattr(module, "REMOTE_TIMEOUT_SECONDS", 1)
monkeypatch.setattr(module, "REMOTE_KILL_AFTER_SECONDS", 1)
monkeypatch.setattr(module, "REMOTE_TERMINATION_MARGIN_SECONDS", 0.1)
@@ -296,6 +298,7 @@ def test_any_password_input_without_success_becomes_unknown(
result = _run(module, tmp_path, journal)
assert marker.read_text(encoding="utf-8") == "first-input-validated\n"
assert result["status"] == "outcome_unknown"
assert result["reason"] == "psql_result_uncertain"
assert states[module.RUNTIME_ROLE] == "unknown"