aboutsummaryrefslogtreecommitdiff
path: root/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'test/java')
-rw-r--r--test/java/install_additional_java.sh13
-rw-r--r--test/java/install_gradle_and_maven.sh13
-rw-r--r--test/java/scenarios.json21
3 files changed, 47 insertions, 0 deletions
diff --git a/test/java/install_additional_java.sh b/test/java/install_additional_java.sh
new file mode 100644
index 0000000..a796fee
--- /dev/null
+++ b/test/java/install_additional_java.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+check "java version 17 installed as default" java --version | grep 17
+check "java version 11 installed" ls /usr/local/sdkman/candidates/java | grep 11
+check "java version 8 installed" ls /usr/local/sdkman/candidates/java | grep 8
+
+# Report result
+reportResults
diff --git a/test/java/install_gradle_and_maven.sh b/test/java/install_gradle_and_maven.sh
new file mode 100644
index 0000000..a81dd9e
--- /dev/null
+++ b/test/java/install_gradle_and_maven.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+check "java" java --version
+check "gradle" gradle --version
+check "maven" mvn --version
+
+# Report result
+reportResults
diff --git a/test/java/scenarios.json b/test/java/scenarios.json
new file mode 100644
index 0000000..659a857
--- /dev/null
+++ b/test/java/scenarios.json
@@ -0,0 +1,21 @@
+{
+ "install_additional_java": {
+ "image": "ubuntu:focal",
+ "features": {
+ "java": {
+ "version": "17",
+ "additionalVersions": "11,8"
+ }
+ }
+ },
+ "install_gradle_and_maven": {
+ "image": "ubuntu:focal",
+ "features": {
+ "java": {
+ "version": "latest",
+ "installGradle": true,
+ "installMaven": true
+ }
+ }
+ }
+} \ No newline at end of file