Skip to content

Commit 1e50983

Browse files
authored
jvm args feature (#15)
1 parent 7aa4d57 commit 1e50983

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,10 @@ services:
100100
environment:
101101
- JAVA_HOME=/path/to/jdk/in/custom/image/bin/java
102102
- JUNIT_PARAMS=--include-classname com.something.integration.*
103+
- JVM_ARGS=-Dfoo.bar=true
103104
```
104105

105-
## Pre compose up script
106+
## pre_compose_up_script
106107

107108
Sometimes, you may need some logic to run before the compose test containers come up. You can use `pre_compose_up_script` for that purpose. See [examples/pre-compose-up-script-test](examples/pre-compose-up-script-test) for an example.
108109

docker_compose/test_container_entrypoint.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ for JAR in $JARS; do
3333
CLASS_PATH_STRING="$CLASS_PATH_STRING --class-path $JAR"
3434
done
3535

36+
# JVM_ARGS can be set in the docker-compose file.
3637
# JUNIT_PARAMS can be set in the docker-compose file to filter for specific tests
3738
# e.g. --include-classname com.something.integration.*
38-
cmd="$JAVA_HOME/bin/java -jar $JUNIT_PLATFORM_CONSOLE_STANDALONE_JAR \
39+
cmd="$JAVA_HOME/bin/java -jar $JVM_ARGS $JUNIT_PLATFORM_CONSOLE_STANDALONE_JAR \
3940
--scan-class-path --fail-if-no-tests $CLASS_PATH_STRING --class-path $TEST_UBER_JAR $JUNIT_PARAMS"
4041
echo $cmd
4142
$cmd

0 commit comments

Comments
 (0)