Publish curated Unraid-AppOps-Gateway source from 0f89e1506065c5365c48968b1d7845d666a18be8

This commit is contained in:
Public Source Publisher committed 2026-10-09 18:15:18 +00:00
1 parent 3eed2d6657
commit a0d1a1224a
8 files changed
+152 -31

No files matched your search

@@ -589,7 +589,7 @@ def _health(
*,
revision: str = REVISION,
tree: str = TREE,
version: str = "2.1.18",
version: str = "2.1.19",
artifact_sha256: str = "1" * 64,
) -> dict[str, Any]:
return {
@@ -1347,7 +1347,7 @@ def test_current_214_baseline_is_verified_and_bound_to_new_helper():
"itworx.controller.promoter": "true",
"itworx.source.repository": "jens/unraid-appops-gateway",
"itworx.source.revision": REVISION,
"itworx.controller.version": "2.1.18",
"itworx.controller.version": "2.1.19",
"itworx.controller.bootstrap.target.id": MODERN_CONTROLLER_CONTAINER_ID,
"itworx.controller.bootstrap.target.image": CONTROLLER_IMAGE_ID,
"itworx.controller.bootstrap.target.revision": MODERN_CONTROLLER_REVISION,
@@ -1826,7 +1826,7 @@ def test_successful_child_requires_exact_source_tree_version_and_health():
assert result["status"] == "promoted"
assert result["revision"] == REVISION
assert result["controllerVersion"] == "2.1.18"
assert result["controllerVersion"] == "2.1.19"
assert result["artifactSha256"] == "1" * 64
assert docker.started == [MODERN_HELPER_ID]
assert docker.created[0]["Image"] == CONTROLLER_IMAGE_ID
@@ -2086,32 +2086,32 @@ def test_modern_upgrade_path_still_requires_private_archive_and_image_id(
def test_current_helper_version_is_distinct_from_fixed_controller_baselines():
source = (ROOT / "backend/app/services/controller_artifact_helper_spec.py").read_bytes()
namespace = bootstrap._safe_modern_spec_namespace(source)
assert namespace["CONTROLLER_VERSION"] == "2.1.18"
assert bootstrap._verified_historical_helper_version(source) == "2.1.18"
assert namespace["CONTROLLER_VERSION"] == "2.1.19"
assert bootstrap._verified_historical_helper_version(source) == "2.1.19"
assert [baseline.version for baseline in bootstrap.CONTROLLER_BASELINES] == ["2.1.12", "2.1.14"]
with pytest.raises(bootstrap.BootstrapError, match="controller_promoter_modern_spec_identity_invalid"):
bootstrap._safe_modern_spec_namespace(RETIRED_MODERN_HELPER_SOURCE.encode("utf-8"))
assert bootstrap._verified_historical_helper_version(RETIRED_MODERN_HELPER_SOURCE.encode("utf-8")) == "2.1.14"
@pytest.mark.parametrize("version", ["2.1.16", "2.1.19", "9.9.9"])
@pytest.mark.parametrize("version", ["2.1.16", "2.1.20", "9.9.9"])
def test_current_and_historical_helper_reject_unreviewed_target_versions(version):
source = (ROOT / "backend/app/services/controller_artifact_helper_spec.py").read_bytes()
foreign = source.replace(b'CONTROLLER_VERSION = "2.1.18"', f'CONTROLLER_VERSION = "{version}"'.encode())
foreign = source.replace(b'CONTROLLER_VERSION = "2.1.19"', f'CONTROLLER_VERSION = "{version}"'.encode())
with pytest.raises(bootstrap.BootstrapError, match="controller_promoter_modern_spec_identity_invalid"):
bootstrap._safe_modern_spec_namespace(foreign)
with pytest.raises(bootstrap.BootstrapError, match="controller_promoter_modern_spec_identity_invalid"):
bootstrap._verified_historical_helper_version(foreign)
@pytest.mark.parametrize("version", ["2.1.14", "2.1.16", "2.1.19"])
@pytest.mark.parametrize("version", ["2.1.14", "2.1.16", "2.1.20"])
def test_promoted_health_cannot_substitute_a_baseline_or_unknown_version(version):
assert not bootstrap._health_matches(_health(version=version), REVISION, TREE)
def test_previous_reviewed_helper_is_historical_only():
source = (ROOT / "backend/app/services/controller_artifact_helper_spec.py").read_bytes()
prior = source.replace(b'CONTROLLER_VERSION = "2.1.18"', b'CONTROLLER_VERSION = "2.1.17"')
prior = source.replace(b'CONTROLLER_VERSION = "2.1.19"', b'CONTROLLER_VERSION = "2.1.18"')
with pytest.raises(bootstrap.BootstrapError, match="controller_promoter_modern_spec_identity_invalid"):
bootstrap._safe_modern_spec_namespace(prior)
assert bootstrap._verified_historical_helper_version(prior) == "2.1.17"
assert bootstrap._verified_historical_helper_version(prior) == "2.1.18"