Skip to content

Commit 75e6ba1

Browse files
committed
Update behave test label checks to check values
Don't test for 'release' or 'architecture' labels which we don't set in our image sources anyway. Check for strings in the values of the 'version' and 'name' labels, to be sure we've set them and not just inherited them. Split the label-check test into those which apply to all images, and those which are builder-only. Signed-off-by: Jonathan Dowland <[email protected]>
1 parent c5124b6 commit 75e6ba1

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

tests/features/openshift.feature

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
# builder-only test
2-
@ubi8/openjdk-8
3-
@ubi8/openjdk-11
4-
@ubi8/openjdk-17
51
Feature: Tests for all openshift images
62

3+
@ubi8
74
Scenario: Check that common labels are correctly set
85
Given image is built
9-
Then the image should contain label version
10-
And the image should contain label name
11-
And the image should contain label io.openshift.s2i.scripts-url with value image:///usr/local/s2i
6+
# UBI base image versions are the RHEL version, e.g. "9.2", whereas all of
7+
# our image versions (so far) have been 1.x
8+
Then the image should contain label version containing value 1.
9+
And the image should contain label name containing value openjdk
10+
11+
# builder-only test
12+
@ubi8/openjdk-8
13+
@ubi8/openjdk-11
14+
@ubi8/openjdk-17
15+
Scenario: Check that builder labels are correctly set
16+
Given image is built
17+
Then the image should contain label io.openshift.s2i.scripts-url with value image:///usr/local/s2i

0 commit comments

Comments
 (0)