Skip to content

Commit 490e7d7

Browse files
authored
Merge pull request #240 from jmtd/openjdk-528-stray-jvm-dirs
[OPENJDK-528] rework singleton-jdk to use a single RPM transaction
2 parents fb878ca + 434936e commit 490e7d7

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

modules/singleton-jdk/configure.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,4 @@ fi
1313

1414
# Clean up any java-* packages that have been installed that do not match
1515
# our stated JAVA_VERSION-JAVA_VENDOR (e.g.: 11-openjdk; 1.8.0-openj9)
16-
rpm -qa java-\* | while read pkg; do
17-
if ! echo "$pkg" | grep -q "^java-${JAVA_VERSION}-${JAVA_VENDOR}"; then
18-
rpm -e --nodeps "$pkg"
19-
fi
20-
done
16+
rpm -e --nodeps $(rpm -qa java-* | grep -v "^java-${JAVA_VERSION}-${JAVA_VENDOR}")

tests/features/java/openjdk.feature

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,27 @@ Feature: Miscellaneous OpenJDK-related unit tests
5252
Then available container log should not contain dejavu-sans-mono-fonts
5353
Then available container log should not contain os-prober
5454
Then available container log should not contain rpm-plugin-systemd-inhibit
55+
56+
@ubi8/openjdk-8
57+
Scenario: Check that directories from other JDKs are not present (JDK8)
58+
When container is started with args
59+
| arg | value |
60+
| command | ls -1 /usr/lib/jvm |
61+
Then available container log should not contain java-11
62+
And available container log should not contain java-17
63+
64+
@ubi8/openjdk-11
65+
Scenario: Check that directories from other JDKs are not present (JDK11)
66+
When container is started with args
67+
| arg | value |
68+
| command | ls -1 /usr/lib/jvm |
69+
Then available container log should not contain java-1.8.0
70+
Then available container log should not contain java-17
71+
72+
@ubi8/openjdk-17
73+
Scenario: Check that directories from other JDKs are not present (JDK17)
74+
When container is started with args
75+
| arg | value |
76+
| command | ls -1 /usr/lib/jvm |
77+
Then available container log should not contain java-1.8.0
78+
Then available container log should not contain java-11

0 commit comments

Comments
 (0)