Package runtime migration scripts correctly
This commit is contained in:
@@ -68,6 +68,37 @@ class RuntimeDistributionBuildTests(unittest.TestCase):
|
||||
workflow,
|
||||
)
|
||||
|
||||
def test_workflow_rejects_missing_or_mutable_image_inputs_before_build(self) -> None:
|
||||
workflow = (ROOT / ".gitea/workflows/runtime-distribution.yml").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
|
||||
validation = workflow.index("- name: Validate immutable release inputs")
|
||||
bootstrap = workflow.index("- name: Bootstrap release sources")
|
||||
self.assertLess(validation, bootstrap)
|
||||
self.assertIn('image_pattern = re.compile(r"^[^@\\s]+@sha256:', workflow)
|
||||
for input_name in (
|
||||
"python_image",
|
||||
"nginx_image",
|
||||
"postgres_image",
|
||||
"redis_image",
|
||||
"load_balancer_image",
|
||||
"managed_ingress_image",
|
||||
"garage_image",
|
||||
"test_mail_image",
|
||||
):
|
||||
self.assertIn(f"inputs.{input_name}", workflow)
|
||||
|
||||
def test_api_runtime_points_core_at_packaged_migration_scripts(self) -> None:
|
||||
dockerfile = (ROOT / "tools/release/runtime/Dockerfile.api").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
|
||||
self.assertIn(
|
||||
"GOVOPLAN_CORE_SOURCE_ROOT=/opt/govoplan/runtime/govoplan_core_runtime",
|
||||
dockerfile,
|
||||
)
|
||||
|
||||
def test_workflow_verifies_portable_bootstrap_artifacts_before_execution(
|
||||
self,
|
||||
) -> None:
|
||||
|
||||
Reference in New Issue
Block a user