Skip to content

Commit c7f38c1

Browse files
committed
[OPENJDK-3935] tests for specific script permissions
This adds tests to ensure certain scripts have the correct permissions. https://issues.redhat.com/browse/OPENJDK-3935 Signed-off-by: Jonathan Dowland <[email protected]>
1 parent 6bb2140 commit c7f38c1

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Feature: test file properties for JVM module
2+
3+
@ubi9
4+
Scenario: Ensure image scripts are executable (OPENJDK-3935)
5+
When container is started with args
6+
| arg | value |
7+
| command | find /opt/jboss/container/java/ -type f -printf "%h/%f %M\n" |
8+
Then available container log should contain /opt/jboss/container/java/jvm/debug-options -rwxr-xr-x
9+
And available container log should contain /opt/jboss/container/java/jvm/java-default-options -rwxr-xr-x
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Feature: test file properties for Maven S2I module
2+
3+
# builder-only test
4+
@ubi9/openjdk-17
5+
@ubi9/openjdk-21
6+
Scenario: Ensure save-artifacts script is executable (OPENJDK-3935)
7+
When container is started with args
8+
| arg | value |
9+
| command | find /usr/local/s2i -type f -printf "%f %M\n" |
10+
Then available container log should contain save-artifacts -rwxr-xr-x

modules/run/tests/features/run.feature

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@ Feature: OpenJDK run script tests
66
| JAVA_OPTS_APPEND | -Djavax.net.ssl.trustStorePassword=sensitiveString |
77
Then container log should not contain sensitiveString
88

9+
Scenario: Ensure image scripts are executable (OPENJDK-3935)
10+
When container is started with args
11+
| arg | value |
12+
| command | find /opt/jboss/container/java/ -type f -printf "%h/%f %M\n" |
13+
Then available container log should contain /opt/jboss/container/java/run/run-java.sh -rwxr-xr-x
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# builder-only test
2+
@ubi9/openjdk-17
3+
@ubi9/openjdk-21
4+
Feature: OpenJDK S2I bash module tests
5+
6+
Scenario: Ensure image scripts are executable (OPENJDK-3935)
7+
When container is started with args
8+
| arg | value |
9+
| command | find /usr/local/s2i/ -type f -printf "%h/%f %M\n" |
10+
Then available container log should contain run -rwxr-xr-x
11+
And available container log should contain assemble -rwxr-xr-x
12+
And available container log should contain usage -rwxr-xr-x

0 commit comments

Comments
 (0)