aboutsummaryrefslogtreecommitdiff
path: root/test
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
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')
-rw-r--r--test/_global/all_the_clis.sh14
-rw-r--r--test/_global/node_java_rust.sh14
-rw-r--r--test/_global/scenarios.json18
-rw-r--r--test/dotnet/install_additional_dotnet.sh13
-rw-r--r--test/dotnet/install_dotnet_3.sh13
-rw-r--r--test/dotnet/install_dotnet_5.sh14
-rw-r--r--test/dotnet/scenarios.json27
-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
-rw-r--r--test/node/install_additional_node.sh17
-rw-r--r--test/node/scenarios.json11
-rw-r--r--test/nvidia-cuda/install_cudnn_nvxt.sh15
-rw-r--r--test/nvidia-cuda/install_cudnn_nvxt_version.sh16
-rw-r--r--test/nvidia-cuda/scenarios.json22
-rw-r--r--test/php/install_additional_php.sh13
-rw-r--r--test/php/scenarios.json11
-rw-r--r--test/python/install_additional_python.sh14
-rw-r--r--test/python/install_jupyterlab.sh16
-rw-r--r--test/python/install_os_provided_python.sh16
-rw-r--r--test/python/scenarios.json31
-rw-r--r--test/ruby/install_additional_ruby.sh13
-rw-r--r--test/ruby/scenarios.json11
-rw-r--r--test/rust/rust_at_pinned_version.sh15
-rw-r--r--test/rust/scenarios.json10
25 files changed, 391 insertions, 0 deletions
diff --git a/test/_global/all_the_clis.sh b/test/_global/all_the_clis.sh
new file mode 100644
index 0000000..71171c1
--- /dev/null
+++ b/test/_global/all_the_clis.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+# Definition specific tests
+check "check for aws" aws --version
+check "check for gh" gh --version
+check "check for azure" az --version
+
+# Report result
+reportResults \ No newline at end of file
diff --git a/test/_global/node_java_rust.sh b/test/_global/node_java_rust.sh
new file mode 100644
index 0000000..5d05729
--- /dev/null
+++ b/test/_global/node_java_rust.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+# Definition specific tests
+check "check for node" node --version
+check "check for java" java --version
+check "check for rust" rustc --version
+
+# Report result
+reportResults \ No newline at end of file
diff --git a/test/_global/scenarios.json b/test/_global/scenarios.json
new file mode 100644
index 0000000..2228c7d
--- /dev/null
+++ b/test/_global/scenarios.json
@@ -0,0 +1,18 @@
+{
+ "all_the_clis": {
+ "image": "ubuntu:focal",
+ "features": {
+ "aws-cli": {},
+ "azure-cli": {},
+ "github-cli": {}
+ }
+ },
+ "node_java_rust": {
+ "image": "ubuntu:focal",
+ "features": {
+ "node": {},
+ "java": {},
+ "rust": {}
+ }
+ }
+} \ No newline at end of file
diff --git a/test/dotnet/install_additional_dotnet.sh b/test/dotnet/install_additional_dotnet.sh
new file mode 100644
index 0000000..fdb2da7
--- /dev/null
+++ b/test/dotnet/install_additional_dotnet.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+check "dotnet version 6.0.301 installed as default" dotnet --version | grep 6.0.301
+check "dotnet version 5.0 installed" ls -l /usr/local/dotnet | grep 5.0
+check "dotnet version 3.1.420 installed" ls -l /usr/local/dotnet | grep 3.1.420
+
+# Report result
+reportResults
diff --git a/test/dotnet/install_dotnet_3.sh b/test/dotnet/install_dotnet_3.sh
new file mode 100644
index 0000000..0d05215
--- /dev/null
+++ b/test/dotnet/install_dotnet_3.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+check "dotnet sdks" dotnet --list-sdks
+check "some major version of dotnet 3 is installed" dotnet --list-sdks | grep '3\.[0-9]*\.[0-9]*'
+check "dotnet version 3 installed" ls -l /usr/share/dotnet/sdk | grep '3\.[0-9]*\.[0-9]*'
+
+# Report result
+reportResults
diff --git a/test/dotnet/install_dotnet_5.sh b/test/dotnet/install_dotnet_5.sh
new file mode 100644
index 0000000..5f48eb1
--- /dev/null
+++ b/test/dotnet/install_dotnet_5.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+check "dotnet sdks" dotnet --list-sdks
+check "some major version of dotnet 5 is installed" dotnet --list-sdks | grep '5\.[0-9]*\.[0-9]*'
+check "dotnet version 5 installed" ls -l /usr/share/dotnet/sdk | grep '5\.[0-9]*\.[0-9]*'
+
+
+# Report result
+reportResults
diff --git a/test/dotnet/scenarios.json b/test/dotnet/scenarios.json
new file mode 100644
index 0000000..edf4a75
--- /dev/null
+++ b/test/dotnet/scenarios.json
@@ -0,0 +1,27 @@
+{
+ "install_additional_dotnet": {
+ "image": "ubuntu:focal",
+ "features": {
+ "dotnet": {
+ "version": "6.0.301",
+ "additionalVersions": "5.0,3.1.420"
+ }
+ }
+ },
+ "install_dotnet_3": {
+ "image": "ubuntu:focal",
+ "features": {
+ "dotnet": {
+ "version": "3"
+ }
+ }
+ },
+ "install_dotnet_5": {
+ "image": "ubuntu:focal",
+ "features": {
+ "dotnet": {
+ "version": "5"
+ }
+ }
+ }
+} \ No newline at end of file
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
diff --git a/test/node/install_additional_node.sh b/test/node/install_additional_node.sh
new file mode 100644
index 0000000..83dae86
--- /dev/null
+++ b/test/node/install_additional_node.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+# 'latest' is some version of node 18 for a while.
+check "version_on_path" node -v | grep 18
+
+check "v18_installed" ls -1 /usr/local/share/nvm/versions/node | grep 18
+check "v14_installed" ls -1 /usr/local/share/nvm/versions/node | grep 14.19.3
+check "v17_installed" ls -1 /usr/local/share/nvm/versions/node | grep 17.9.1
+
+
+# Report result
+reportResults
diff --git a/test/node/scenarios.json b/test/node/scenarios.json
new file mode 100644
index 0000000..845c892
--- /dev/null
+++ b/test/node/scenarios.json
@@ -0,0 +1,11 @@
+{
+ "install_additional_node": {
+ "image": "debian:11",
+ "features": {
+ "node": {
+ "version": "latest",
+ "additionalVersions": "v17.9.1,v14.19.3"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/test/nvidia-cuda/install_cudnn_nvxt.sh b/test/nvidia-cuda/install_cudnn_nvxt.sh
new file mode 100644
index 0000000..7b20f43
--- /dev/null
+++ b/test/nvidia-cuda/install_cudnn_nvxt.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+# Check installation of libcudnn8
+check "libcudnn.so.8" test 1 -eq "$(find /usr -name 'libcudnn.so.8' | wc -l)"
+
+# Check installation of cuda-nvtx-11-<version>
+check "cuda-11+nvtx" test -e '/usr/local/cuda-11/targets/x86_64-linux/include/nvtx3'
+
+# Report result
+reportResults
diff --git a/test/nvidia-cuda/install_cudnn_nvxt_version.sh b/test/nvidia-cuda/install_cudnn_nvxt_version.sh
new file mode 100644
index 0000000..a7f46bd
--- /dev/null
+++ b/test/nvidia-cuda/install_cudnn_nvxt_version.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+# Check installation of libcudnn8 (8.3.2)
+check "libcudnn.so.8.3.2" test 1 -eq "$(find /usr -name 'libcudnn.so.8.3.2' | wc -l)"
+
+# Check installation of cuda-nvtx-11-5 (11.5)
+check "cuda-11-5+nvtx" test -e '/usr/local/cuda-11.5/targets/x86_64-linux/include/nvtx3'
+
+# Report result
+reportResults
+ \ No newline at end of file
diff --git a/test/nvidia-cuda/scenarios.json b/test/nvidia-cuda/scenarios.json
new file mode 100644
index 0000000..1993dcd
--- /dev/null
+++ b/test/nvidia-cuda/scenarios.json
@@ -0,0 +1,22 @@
+{
+ "install_cudnn_nvxt": {
+ "image": "debian",
+ "features": {
+ "nvidia-cuda": {
+ "installCudnn": true,
+ "installNvtx": true
+ }
+ }
+ },
+ "install_cudnn_nvxt_version": {
+ "image": "debian",
+ "features": {
+ "nvidia-cuda": {
+ "installCudnn": true,
+ "installNvtx": true,
+ "cudaVersion": "11.5",
+ "cudnnVersion": "8.3.2.44"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/test/php/install_additional_php.sh b/test/php/install_additional_php.sh
new file mode 100644
index 0000000..590187a
--- /dev/null
+++ b/test/php/install_additional_php.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+check "php version 8.1.4 installed as default" php --version | grep 8.1.4
+check "php version 8.0.17 installed" ls -l /usr/local/php | grep 8.0.17
+check "php version 8.0.3 installed" ls -l /usr/local/php | grep 8.0.3
+
+# Report result
+reportResults
diff --git a/test/php/scenarios.json b/test/php/scenarios.json
new file mode 100644
index 0000000..f24753b
--- /dev/null
+++ b/test/php/scenarios.json
@@ -0,0 +1,11 @@
+{
+ "install_additional_php": {
+ "image": "ubuntu:focal",
+ "features": {
+ "php": {
+ "version": "8.1.4",
+ "additionalVersions": "8.0.17,8.0.3"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/test/python/install_additional_python.sh b/test/python/install_additional_python.sh
new file mode 100644
index 0000000..b0393d3
--- /dev/null
+++ b/test/python/install_additional_python.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+check "python version 3.10.5 installed as default" python --version | grep 3.10.5
+check "python3 version 3.10.5 installed as default" python3 --version | grep 3.10.5
+check "python version 3.8.13 installed" ls -l /usr/local/python | grep 3.8.13
+check "python version 3.9.13 installed" ls -l /usr/local/python | grep 3.9.13
+
+# Report result
+reportResults
diff --git a/test/python/install_jupyterlab.sh b/test/python/install_jupyterlab.sh
new file mode 100644
index 0000000..9c5e453
--- /dev/null
+++ b/test/python/install_jupyterlab.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+check "version" jupyter lab --version
+check "config" grep ".*.allow_origin = '*'" /home/vscode/.jupyter/jupyter_notebook_config.py
+
+check "user" whoami | grep vscode
+check "zsh" zsh --version
+check "wget" wget -V
+
+# Report result
+reportResults
diff --git a/test/python/install_os_provided_python.sh b/test/python/install_os_provided_python.sh
new file mode 100644
index 0000000..50a617e
--- /dev/null
+++ b/test/python/install_os_provided_python.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+check "python3 is installed" python3 --version
+check "python is installed" python --version
+check "pip is installed" pip --version
+check "pip is installed" pip3 --version
+
+check "node is installed" node --version
+
+# Report result
+reportResults \ No newline at end of file
diff --git a/test/python/scenarios.json b/test/python/scenarios.json
new file mode 100644
index 0000000..2aa246f
--- /dev/null
+++ b/test/python/scenarios.json
@@ -0,0 +1,31 @@
+{
+ "install_additional_python": {
+ "image": "ubuntu:focal",
+ "features": {
+ "python": {
+ "version": "3.10.5",
+ "additionalVersions": "3.8,3.9.13"
+ }
+ }
+ },
+ "install_jupyterlab": {
+ "image": "mcr.microsoft.com/vscode/devcontainers/base:focal",
+ "remoteUser": "vscode",
+ "features": {
+ "common-utils": {
+ "username": "vscode"
+ },
+ "python": {
+ "installJupyterlab": true,
+ "configureJupyterlabAllowOrigin": "*"
+ }
+ }
+ },
+ "install_os_provided_python": {
+ "image": "mcr.microsoft.com/devcontainers/base:0-bullseye",
+ "features": {
+ "node": "latest",
+ "python": "os-provided"
+ }
+ }
+} \ No newline at end of file
diff --git a/test/ruby/install_additional_ruby.sh b/test/ruby/install_additional_ruby.sh
new file mode 100644
index 0000000..3e76159
--- /dev/null
+++ b/test/ruby/install_additional_ruby.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+check "ruby version 3.1.2 installed as default" ruby -v | grep 3.1.2
+check "ruby version 2.5.9 installed" rvm list | grep 2.5.9
+check "ruby version 3.0.4 installed" rvm list | grep 3.0.4
+
+# Report result
+reportResults
diff --git a/test/ruby/scenarios.json b/test/ruby/scenarios.json
new file mode 100644
index 0000000..9f88d9e
--- /dev/null
+++ b/test/ruby/scenarios.json
@@ -0,0 +1,11 @@
+{
+ "install_additional_ruby": {
+ "image": "ubuntu:focal",
+ "features": {
+ "ruby": {
+ "version": "3.1.2",
+ "additionalVersions": "2.5,3.0.4"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/test/rust/rust_at_pinned_version.sh b/test/rust/rust_at_pinned_version.sh
new file mode 100644
index 0000000..2954a7a
--- /dev/null
+++ b/test/rust/rust_at_pinned_version.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+# Definition specific tests
+check "cargo version" cargo --version
+check "rustc version" rustc --version
+check "correct rust version" rustc --version | grep 1.62.0
+
+
+# Report result
+reportResults \ No newline at end of file
diff --git a/test/rust/scenarios.json b/test/rust/scenarios.json
new file mode 100644
index 0000000..4a2d540
--- /dev/null
+++ b/test/rust/scenarios.json
@@ -0,0 +1,10 @@
+{
+ "rust_at_pinned_version": {
+ "image": "ubuntu:focal",
+ "features": {
+ "rust": {
+ "version": "1.62.0"
+ }
+ }
+ }
+} \ No newline at end of file