aboutsummaryrefslogtreecommitdiff
path: root/test/java
diff options
context:
space:
mode:
authorJosh Spicer <joshspicer@github.com>2022-08-24 00:23:21 +0300
committerGitHub <noreply@github.com>2022-08-24 00:23:21 +0300
commitf82307ad60514d1e912a9aa2b64204721fe955eb (patch)
treebc1799743ef7620c3e460d54f77c1fac3003fd4c /test/java
parent84f4996643b84c6f3dcd5c3edc72ae176dceaf65 (diff)
test updates to adopt https://github.com/devcontainers/cli/pull/124 (#114)
* test updates to adopt https://github.com/devcontainers/cli/pull/124 * remove accidental tgz check in * typo in option * typo in python install script on dotnet6/jammy branch * no scenarios * code review and test name * Delete install_os_provided_python.sh
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