Publish curated Unraid-AppOps-Gateway source from 828f7274cafede223d37b2697367bfd89357b079

This commit is contained in:
Public Source Publisher committed 2026-10-08 21:28:59 +00:00
1 parent 551de41e9f
commit e49634bb10
7 files changed
+449 -24

No files matched your search

@@ -39,6 +39,19 @@ def _load_module():
return module
@pytest.mark.parametrize("cache", ["registered-builds", "registered-builds-v2"])
def test_registered_adoption_accepts_only_versioned_owned_archive_roots(tmp_path, monkeypatch, cache):
module = _load_module()
monkeypatch.setattr(module, "REGISTERED_BUILD_ROOT", tmp_path / "registered-builds")
tree = tmp_path / cache / "quiz-monitor" / TARGET_SHA / "tree"
tree.mkdir(parents=True)
services = {"quiz-server": {"build": {"context": "."}}}
assert module._validated_build_contexts("quiz-monitor", TARGET_SHA, services, {"quiz-server": str(tree)}) == {"quiz-server": str(tree)}
for foreign in (tree.parent, tree.with_name("tree-outside"), tree / ".." / "outside"):
with pytest.raises(module.RegisteredLegacyAdoptionError):
module._validated_build_contexts("quiz-monitor", TARGET_SHA, services, {"quiz-server": str(foreign)})
@pytest.fixture
def module():
return _load_module()