diff options
author | Samruddhi Khandale <skhandale@microsoft.com> | 2023-06-30 01:14:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-30 01:14:11 +0300 |
commit | 300814be97eaa5b7780886bd2eb37e96b523b3e7 (patch) | |
tree | 9db60abc9475d2f379dc53861d7c8a928bd6e34a /test | |
parent | 8a51aa906676280364df60010575b7dad3162f37 (diff) |
Dotnet: Fix Feature failures on ubuntu:jammy (when installing using apt) (#590)feature_dotnet_1.1.4
* fix several bugs
* fix test: .NET is now installed from ubuntu feeds
* add comment ; use dev containers image
* address comments
* revert debugging cmd
* fix test for bookworm
Diffstat (limited to 'test')
-rw-r--r-- | test/dotnet/install_dotnet_6_jammy.sh | 17 | ||||
-rw-r--r-- | test/dotnet/install_dotnet_7_jammy.sh | 2 | ||||
-rw-r--r-- | test/dotnet/install_dotnet_latest.sh | 2 | ||||
-rw-r--r-- | test/dotnet/scenarios.json | 8 | ||||
-rwxr-xr-x | test/dotnet/test.sh | 2 |
5 files changed, 28 insertions, 3 deletions
diff --git a/test/dotnet/install_dotnet_6_jammy.sh b/test/dotnet/install_dotnet_6_jammy.sh new file mode 100644 index 0000000..fd10634 --- /dev/null +++ b/test/dotnet/install_dotnet_6_jammy.sh @@ -0,0 +1,17 @@ +#!/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 6 is installed" bash -c "dotnet --list-sdks | grep '6\.[0-9]*\.[0-9]*'" +check "dotnet version 6 installed" bash -c "ls -l /usr/lib/dotnet/sdk | grep '6\.[0-9]*\.[0-9]*'" + +# Verify current symlink exists and works +check "current link dotnet" /usr/local/dotnet/current/dotnet --info +check "current link sdk" ls -l /usr/local/dotnet/current/sdk + +# Report result +reportResults diff --git a/test/dotnet/install_dotnet_7_jammy.sh b/test/dotnet/install_dotnet_7_jammy.sh index 2c015fc..1392168 100644 --- a/test/dotnet/install_dotnet_7_jammy.sh +++ b/test/dotnet/install_dotnet_7_jammy.sh @@ -7,7 +7,7 @@ source dev-container-features-test-lib check "dotnet sdks" dotnet --list-sdks check "some major version of dotnet 7 is installed" bash -c "dotnet --list-sdks | grep '7\.[0-9]*\.[0-9]*'" -check "dotnet version 7 installed" bash -c "ls -l /usr/share/dotnet/sdk | grep '7\.[0-9]*\.[0-9]*'" +check "dotnet version 7 installed" bash -c "ls -l /usr/lib/dotnet/sdk | grep '7\.[0-9]*\.[0-9]*'" # Verify current symlink exists and works check "current link dotnet" /usr/local/dotnet/current/dotnet --info diff --git a/test/dotnet/install_dotnet_latest.sh b/test/dotnet/install_dotnet_latest.sh index 2c015fc..1392168 100644 --- a/test/dotnet/install_dotnet_latest.sh +++ b/test/dotnet/install_dotnet_latest.sh @@ -7,7 +7,7 @@ source dev-container-features-test-lib check "dotnet sdks" dotnet --list-sdks check "some major version of dotnet 7 is installed" bash -c "dotnet --list-sdks | grep '7\.[0-9]*\.[0-9]*'" -check "dotnet version 7 installed" bash -c "ls -l /usr/share/dotnet/sdk | grep '7\.[0-9]*\.[0-9]*'" +check "dotnet version 7 installed" bash -c "ls -l /usr/lib/dotnet/sdk | grep '7\.[0-9]*\.[0-9]*'" # Verify current symlink exists and works check "current link dotnet" /usr/local/dotnet/current/dotnet --info diff --git a/test/dotnet/scenarios.json b/test/dotnet/scenarios.json index 37f83d5..afee26f 100644 --- a/test/dotnet/scenarios.json +++ b/test/dotnet/scenarios.json @@ -48,6 +48,14 @@ } } }, + "install_dotnet_6_jammy": { + "image": "mcr.microsoft.com/devcontainers/base:jammy", + "features": { + "dotnet": { + "version": "6" + } + } + }, "install_dotnet_latest": { "image": "ubuntu:jammy", "features": { diff --git a/test/dotnet/test.sh b/test/dotnet/test.sh index 7eb0cf6..f433654 100755 --- a/test/dotnet/test.sh +++ b/test/dotnet/test.sh @@ -11,7 +11,7 @@ check "sdks" dotnet --list-sdks check "version" dotnet --version echo "Validating expected version present..." -check "some major version of dotnet 7 is installed" bash -c "dotnet --version | grep '7\.[0-9]*\.[0-9]*'" +check "some major version of dotnet (7/8) is installed" bash -c "dotnet --version | grep '[7-8]\.[0-9]*\.[0-9]*'" # Verify current symlink exists and works check "current link dotnet" /usr/local/dotnet/current/dotnet --info |