Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only check the version label on releases
Browse files Browse the repository at this point in the history
Update the test configuration to only check the
org.opencontainers.image.version label on releases. We must make this
change because the docker/metadata-action will only populate the label
with an appropriate value on a release. Otherwise it will be the branch
that is sourced when building the image.
mcdonnnj committed Jan 10, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent cb6d024 commit 1e1f268
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/container_test.py
Original file line number Diff line number Diff line change
@@ -77,6 +77,9 @@ def test_log_version(dockerc, project_version, version_container):
), f"Container version output to log does not match project version file {VERSION_FILE}"


@pytest.mark.skipif(
RELEASE_TAG in [None, ""], reason="this is not a release (RELEASE_TAG not set)"
)
def test_container_version_label_matches(project_version, version_container):
"""Verify the container version label is the correct version."""
assert (

0 comments on commit 1e1f268

Please sign in to comment.