aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dotnet/install.sh2
-rw-r--r--test/dotnet/install_dotnet_runtime.sh15
-rw-r--r--test/dotnet/scenarios.json9
3 files changed, 25 insertions, 1 deletions
diff --git a/src/dotnet/install.sh b/src/dotnet/install.sh
index 4d14a90..455d679 100644
--- a/src/dotnet/install.sh
+++ b/src/dotnet/install.sh
@@ -55,7 +55,7 @@ install_version() {
if [ "$DOTNET_RUNTIME_ONLY" = 'true' ]; then
echo "Installing runtime only..."
- runtime_arg = '--runtime dotnet'
+ runtime_arg='--runtime dotnet'
fi
"$DOTNET_INSTALL_SCRIPT" \
diff --git a/test/dotnet/install_dotnet_runtime.sh b/test/dotnet/install_dotnet_runtime.sh
new file mode 100644
index 0000000..f7f2752
--- /dev/null
+++ b/test/dotnet/install_dotnet_runtime.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+# some runtime installed
+check "runtime" bash -c 'test "$(dotnet --list-runtimes | wc -l)" -gt 0'
+
+# no sdk installed
+check "no sdk" bash -c 'test "$(dotnet --list-sdks | wc -l)" -eq 0'
+
+# Report result
+reportResults
diff --git a/test/dotnet/scenarios.json b/test/dotnet/scenarios.json
index 120be7e..f865e60 100644
--- a/test/dotnet/scenarios.json
+++ b/test/dotnet/scenarios.json
@@ -47,5 +47,14 @@
"version": "7"
}
}
+ },
+ "install_dotnet_runtime": {
+ "image": "ubuntu:jammy",
+ "features": {
+ "dotnet": {
+ "version": "6.0.14",
+ "runtimeOnly": true
+ }
+ }
}
} \ No newline at end of file