fix: enable XML processing in container entry

This commit is contained in:
Wyndham ARR
2026-07-29 18:34:03 +08:00
parent 12881be17e
commit ad3d9878c5
13 changed files with 118 additions and 16 deletions

View File

@@ -0,0 +1,30 @@
from __future__ import annotations
import json
import unittest
from pathlib import Path
PROJECT_ROOT = Path(__file__).resolve().parents[1]
class DeploymentEntrypointTests(unittest.TestCase):
def test_default_container_opens_only_xml_processing_mutation(self) -> None:
dockerfile = (PROJECT_ROOT / "Dockerfile").read_text(encoding="utf-8")
commands = [
json.loads(line.removeprefix("CMD "))
for line in dockerfile.splitlines()
if line.startswith("CMD ")
]
self.assertEqual(len(commands), 1)
command = commands[0]
self.assertEqual(command[:3], ["python", "-m", "arr_web.run"])
self.assertIn("--enable-processing", command)
self.assertNotIn("--enable-monthly-generation", command)
self.assertNotIn("--enable-company-reports", command)
self.assertNotIn("--enable-agent-writeback", command)
if __name__ == "__main__":
unittest.main(verbosity=2)