|
| 1 | +Feature: Miscellaneous OpenJDK-related unit tests |
| 2 | + |
| 3 | + @ubi9/openjdk-11 |
| 4 | + @ubi9/openjdk-11-runtime |
| 5 | + Scenario: Check that only OpenJDK 11 is installed |
| 6 | + When container is started with args |
| 7 | + | arg | value | |
| 8 | + | command | rpm -qa | |
| 9 | + Then available container log should not contain java-1.8.0 |
| 10 | + Then available container log should not contain java-17 |
| 11 | + Then available container log should not contain java-21 |
| 12 | + |
| 13 | + @ubi9/openjdk-17 |
| 14 | + @ubi9/openjdk-17-runtime |
| 15 | + Scenario: Check that only OpenJDK 17 is installed |
| 16 | + When container is started with args |
| 17 | + | arg | value | |
| 18 | + | command | rpm -qa | |
| 19 | + Then available container log should not contain java-1.8.0 |
| 20 | + Then available container log should not contain java-11 |
| 21 | + Then available container log should not contain java-21 |
| 22 | + |
| 23 | + @ubi9/openjdk-21 |
| 24 | + @ubi9/openjdk-21-runtime |
| 25 | + Scenario: Check that only OpenJDK 21 is installed |
| 26 | + When container is started with args |
| 27 | + | arg | value | |
| 28 | + | command | rpm -qa | |
| 29 | + Then available container log should not contain java-1.8.0 |
| 30 | + Then available container log should not contain java-11 |
| 31 | + Then available container log should not contain java-17 |
| 32 | + |
| 33 | + @ubi9 |
| 34 | + Scenario: Ensure JAVA_HOME is defined and contains Java |
| 35 | + When container is started with args |
| 36 | + | arg | value | |
| 37 | + | command | bash -c "$JAVA_HOME/bin/java -version" | |
| 38 | + Then available container log should contain OpenJDK Runtime Environment |
| 39 | + |
| 40 | + @ubi9 |
| 41 | + Scenario: Check that certain non-UBI packages are not installed |
| 42 | + When container is started with args |
| 43 | + | arg | value | |
| 44 | + | command | rpm -qa | |
| 45 | + Then available container log should not contain grub |
| 46 | + Then available container log should not contain os-prober |
| 47 | + Then available container log should not contain rpm-plugin-systemd-inhibit |
| 48 | + |
| 49 | + @ubi9/openjdk-11 |
| 50 | + @ubi9/openjdk-11-runtime |
| 51 | + Scenario: Check that directories from other JDKs are not present (JDK11) |
| 52 | + When container is started with args |
| 53 | + | arg | value | |
| 54 | + | command | ls -1 /usr/lib/jvm | |
| 55 | + Then available container log should not contain java-1.8.0 |
| 56 | + Then available container log should not contain java-17 |
| 57 | + Then available container log should not contain java-21 |
| 58 | + |
| 59 | + @ubi9/openjdk-17 |
| 60 | + @ubi9/openjdk-17-runtime |
| 61 | + Scenario: Check that directories from other JDKs are not present (JDK17) |
| 62 | + When container is started with args |
| 63 | + | arg | value | |
| 64 | + | command | ls -1 /usr/lib/jvm | |
| 65 | + Then available container log should not contain java-1.8.0 |
| 66 | + Then available container log should not contain java-11 |
| 67 | + Then available container log should not contain java-21 |
| 68 | + |
| 69 | + @ubi9/openjdk-21 |
| 70 | + @ubi9/openjdk-21-runtime |
| 71 | + Scenario: Check that directories from other JDKs are not present (JDK21) |
| 72 | + When container is started with args |
| 73 | + | arg | value | |
| 74 | + | command | ls -1 /usr/lib/jvm | |
| 75 | + Then available container log should not contain java-1.8.0 |
| 76 | + Then available container log should not contain java-11 |
| 77 | + Then available container log should not contain java-17 |
| 78 | + |
| 79 | + @ubi9 |
| 80 | + Scenario: Ensure LANG is defined and contains UTF-8 |
| 81 | + When container is started with args |
| 82 | + | arg | value | |
| 83 | + | command | bash -c "$JAVA_HOME/bin/java -XshowSettings:properties -version" | |
| 84 | + Then available container log should contain file.encoding = UTF-8 |
| 85 | + |
| 86 | + @ubi9 |
| 87 | + Scenario: Ensure tar is installed (OPENJDK-1165) |
| 88 | + When container is started with args |
| 89 | + | arg | value | |
| 90 | + | command | tar | |
| 91 | + Then available container log should not contain command not found |
| 92 | + |
| 93 | + @ubi9 |
| 94 | + Scenario: Ensure tzdata RPM is properly installed (OPENJDK-2519) |
| 95 | + When container is started with args |
| 96 | + | arg | value | |
| 97 | + | command | rpm -V tzdata | |
| 98 | + Then available container log should not contain missing |
0 commit comments