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

+30 -1
View File
@@ -94,6 +94,35 @@ def test_exact_archive_omits_live_untracked_files_and_preserves_live_tree(inputs
assert (tree / "run.sh").stat().st_mode & 0o777 == 0o755
@pytest.mark.skipif(os.name == "nt", reason="POSIX Docker COPY directory modes")
def test_committed_directories_remain_traversable_after_docker_copy(inputs):
module = load()
tree = Path(prepare(module, inputs)["quiz-server"])
# Docker COPY preserves these modes in the image, whose application runs
# as another UID. The enclosing private cache protects the source on host.
assert tree.parent.stat().st_mode & 0o777 == 0o700
for directory in (tree, tree / "server"):
assert directory.stat().st_mode & 0o777 == 0o755
(tree / "server").chmod(0o700)
with pytest.raises(module.RegisteredBuildContextError):
prepare(module, inputs)
def test_new_cache_does_not_rewrite_existing_private_directory_context(inputs):
legacy = inputs[4] / "registered-builds" / "quiz-monitor" / inputs[1]
legacy.mkdir(parents=True, mode=0o700)
marker = legacy / "signed-consumer-fixture"
marker.write_bytes(b"keep previous build bytes")
marker.chmod(0o600)
before = marker.stat()
tree = Path(prepare(load(), inputs)["quiz-server"])
assert "registered-builds-v2" in tree.parts
assert marker.read_bytes() == b"keep previous build bytes"
assert marker.stat() == before
if os.name != "nt":
assert legacy.stat().st_mode & 0o777 == 0o700
@pytest.mark.parametrize("change", ["content", "extra", "missing", "mode", "manifest"])
def test_cached_context_drift_fails_without_replacing_source(inputs, change):
module = load()
@@ -212,7 +241,7 @@ def test_git_export_attributes_cannot_change_exact_archive_bytes(inputs):
git(inputs[0], "fetch", "--quiet", str(inputs[6]), "+HEAD:refs/heads/main")
with pytest.raises(module.RegisteredBuildContextError):
module.prepare_build_contexts(inputs[0], revision, *inputs[2:5])
assert not inputs[4].joinpath("registered-builds/quiz-monitor", revision).exists()
assert not inputs[4].joinpath("registered-builds-v2/quiz-monitor", revision).exists()
@pytest.mark.skipif(os.name == "nt", reason="POSIX symlink boundary")