Add runtime test

This commit is contained in:
JP Ungaretti 2023-03-01 07:57:41 +00:00
parent a4746b2feb
commit ab80288568
3 changed files with 25 additions and 1 deletions

View file

@ -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" \

View file

@ -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

View file

@ -47,5 +47,14 @@
"version": "7"
}
}
},
"install_dotnet_runtime": {
"image": "ubuntu:jammy",
"features": {
"dotnet": {
"version": "6.0.14",
"runtimeOnly": true
}
}
}
}