Skip to content

Commit 56dc013

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 56dc013

File tree

4 files changed

+40
-0
lines changed

4 files changed

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

modules/run/tests/features/run.feature

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

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

0 commit comments

Comments
 (0)