Publish curated Unraid-AppOps-Gateway source from a506550ef83ef2d81651e37c98a89f7ee330c730

This commit is contained in:
Public Source Publisher committed 2026-10-03 13:35:10 +00:00
1 parent 2facb8de34
commit 767e66921e
68 files changed
+15924 -313

No files matched your search

@@ -2,6 +2,8 @@ from __future__ import annotations
import importlib.util
import os
import re
import shlex
import stat
from pathlib import Path
@@ -211,7 +213,9 @@ def test_upgrade_prepares_and_validates_captured_optional_private_tls_before_sto
def test_upgrade_rolls_back_state_before_restoring_or_starting_the_old_writer():
script = UPGRADE_PATH.read_text(encoding="utf-8")
restore = script[script.index("restore_previous() {") : script.index("cleanup() {")]
restore_start = script.index("restore_previous() {")
cleanup_start = script.index("cleanup() {", restore_start)
restore = script[restore_start:cleanup_start]
stop = 'if ! python3 "${work}/${PREPARER_NAME}" rollback --backup "$backup" --stop-only; then'
rollback = '--rollback'
@@ -245,6 +249,12 @@ def test_wrapper_archives_the_fixed_operator_handoff_required_by_root_upgrade():
wrapper = WRAPPER_PATH.read_text(encoding="utf-8")
upgrade = UPGRADE_PATH.read_text(encoding="utf-8")
archive_line = next(line for line in wrapper.splitlines() if "git archive" in line)
source_paths_match = re.search(r"(?ms)^source_paths=\((.*?)^\)", upgrade)
assert "scripts/run_repopulse_adoption.py" in archive_line
assert '"scripts/run_repopulse_adoption.py"' in upgrade
assert source_paths_match is not None
assert "scripts/run_repopulse_adoption.py" in shlex.split(source_paths_match.group(1))
assert (
'install -o root -g root -m 0700 "${script_dir}/run_repopulse_adoption.py" '
'"${work}/source/controller/run_repopulse_adoption.py"'
) in upgrade