From 3644a7aae443792d9583c203c8859c2c9ea1e931 Mon Sep 17 00:00:00 2001 From: Martin Malina Date: Tue, 22 Oct 2024 19:52:17 +0200 Subject: [PATCH] test: dot in a label for tag expansion (#633) This just adds coverage for case when there is a dot in the label name. Signed-off-by: Martin Malina --- tasks/apply-mapping/tests/mocks.sh | 2 +- tasks/apply-mapping/tests/test-apply-mapping-tag-expansion.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/apply-mapping/tests/mocks.sh b/tasks/apply-mapping/tests/mocks.sh index d3c847db9..d935d2084 100644 --- a/tasks/apply-mapping/tests/mocks.sh +++ b/tasks/apply-mapping/tests/mocks.sh @@ -39,7 +39,7 @@ function skopeo() { return elif [[ "$*" == "inspect --no-tags --override-os linux --override-arch amd64 docker://registry.io/labels"* ]] then - echo '{"Labels": {"build-date": "2024-07-29T02:17:29", "Goodlabel": "labelvalue", "Goodlabel-with-dash": "labelvalue-with-dash", "Badlabel": "label with space"}}' + echo '{"Labels": {"build-date": "2024-07-29T02:17:29", "Goodlabel": "labelvalue", "Goodlabel.with-dash": "labelvalue-with-dash", "Badlabel": "label with space"}}' return elif [[ "$*" == "inspect --no-tags --override-os linux --override-arch amd64 docker://registry.io/onlycreated"* ]] then diff --git a/tasks/apply-mapping/tests/test-apply-mapping-tag-expansion.yaml b/tasks/apply-mapping/tests/test-apply-mapping-tag-expansion.yaml index 27f9edc1d..74238e40c 100644 --- a/tasks/apply-mapping/tests/test-apply-mapping-tag-expansion.yaml +++ b/tasks/apply-mapping/tests/test-apply-mapping-tag-expansion.yaml @@ -43,7 +43,7 @@ spec: "foo-{{digest_sha}}", "{{ digest_sha }}", "tag-{{ labels.Goodlabel }}", - "tag-{{ labels.Goodlabel-with-dash }}", + "tag-{{ labels.Goodlabel.with-dash }}", "tag1-2024-07-29" ] },