teleo-infrastructure/tests/test_gcp_artifact_workflow.py
twentyOne2x b9acc4855c
Some checks are pending
CI / lint-and-test (push) Waiting to run
Make GCP artifact publish idempotent (#57)
2026-07-07 14:40:23 +02:00

15 lines
680 B
Python

from pathlib import Path
def test_gcp_artifact_workflow_retains_immutable_image_digest() -> None:
workflow = Path(".github/workflows/gcp-artifact.yml").read_text()
assert "gcloud artifacts docker images describe" in workflow
assert "Image tag already exists; reusing immutable Artifact Registry image." in workflow
assert 'docker pull "${image_uri}@${image_digest}"' in workflow
assert 'docker run --rm "${image_uri}@${image_digest}"' in workflow
assert "docker push" in workflow
assert "tee docker-push.log" in workflow
assert "image_digest=" in workflow
assert "image_ref=" in workflow
assert "test -n \"${image_digest}\"" in workflow