fix: disk image
Build and Publish Container / Publish Linux container (push) Successful in 4m11s

This commit is contained in:
2026-10-05 18:09:15 -04:00
parent 79e953bbe7
commit c79aad1cb9
4 changed files with 145 additions and 1 deletions
+54
View File
@@ -197,6 +197,60 @@ class BackendTests(unittest.TestCase):
(content_dir.parent.parent / ".progression-write-test").exists()
)
@patch("progression_backend.workshop.subprocess.run")
def test_steamcmd_runner_forces_mounted_install_root(self, run: Mock) -> None:
with tempfile.TemporaryDirectory() as directory:
root = Path(directory)
executable = root / "steamcmd"
executable.write_text("", encoding="utf-8")
content_dir = (
root / "steamapps" / "workshop" / "content" / "294100"
)
run.return_value = Mock(returncode=0, stdout="", stderr="")
runner = SteamCmdRunner(str(executable), content_dir, 60)
runner.run_batch(["123456"])
command = run.call_args.args[0]
self.assertEqual(
command[:5],
[
str(executable.resolve()),
"+force_install_dir",
str(root),
"+login",
"anonymous",
],
)
def test_steamcmd_io_recovery_preserves_completed_mods(self) -> None:
with tempfile.TemporaryDirectory() as directory:
content_dir = (
Path(directory)
/ "steamapps"
/ "workshop"
/ "content"
/ "294100"
)
completed_mod = content_dir / "123456" / "About"
completed_mod.mkdir(parents=True)
(completed_mod / "About.xml").write_text("<ModMetaData />")
workshop_dir = content_dir.parent.parent
manifest = workshop_dir / "appworkshop_294100.acf"
manifest.write_text("stale", encoding="utf-8")
staging = workshop_dir / "downloads" / "294100"
staging.mkdir(parents=True)
(staging / "partial.bin").write_bytes(b"partial")
runner = SteamCmdRunner("steamcmd", content_dir, 60)
moved = runner.recover_io_failure()
self.assertEqual(len(moved), 2)
self.assertFalse(manifest.exists())
self.assertFalse(staging.exists())
self.assertTrue((completed_mod / "About.xml").is_file())
self.assertEqual(runner.recover_io_failure(), [])
def test_rml_uses_workshop_id_and_escapes_names(self) -> None:
payload = generate_rml(
[