from pathlib import Path import unittest ROOT = Path(__file__).parents[1] class LocalMultiplayerGateTest(unittest.TestCase): def test_godot_gate_has_a_digest_pinned_container_fallback(self): script = (ROOT / "scripts" / "verify_multiplayer_local.sh").read_text() self.assertIn("run_godot_harness()", script) self.assertIn("barichello/godot-ci@sha256:", script) self.assertIn("docker run --rm --platform linux/amd64", script) self.assertIn("type=bind,src=$root_dir,dst=/workspace", script) self.assertIn("Godot executable not found", script) def test_native_engine_crash_falls_back_but_test_failure_does_not(self): script = (ROOT / "scripts" / "verify_multiplayer_local.sh").read_text() self.assertIn('if [[ "$native_status" -lt 128 ]]', script) self.assertIn("native Godot crashed", script) if __name__ == "__main__": unittest.main()