From 5bb6f303a1e23eeac37061a8025c5f04ce1eff86 Mon Sep 17 00:00:00 2001 From: JP Ungaretti Date: Wed, 1 Mar 2023 17:22:14 +0000 Subject: [PATCH] Finishing touches --- test/dotnet/install_additional_dotnet.sh | 4 +--- test/dotnet/install_dotnet_3.sh | 2 -- test/dotnet/install_dotnet_6_bullseye.sh | 2 -- test/dotnet/install_dotnet_6_focal.sh | 2 -- test/dotnet/install_dotnet_7_bullseye.sh | 2 -- test/dotnet/install_dotnet_7_jammy.sh | 2 -- test/dotnet/install_dotnet_runtime.sh | 6 ++---- test/dotnet/test.sh | 9 ++++----- 8 files changed, 7 insertions(+), 22 deletions(-) diff --git a/test/dotnet/install_additional_dotnet.sh b/test/dotnet/install_additional_dotnet.sh index 6a0eb96..3f0539e 100644 --- a/test/dotnet/install_additional_dotnet.sh +++ b/test/dotnet/install_additional_dotnet.sh @@ -2,7 +2,6 @@ set -e -# Optional: Import test library source dev-container-features-test-lib ./test.sh @@ -10,8 +9,7 @@ source dev-container-features-test-lib check "version 6.0.405 installed" bash -c 'dotnet --list-sdks | grep 6.0.405' check "version 3.1.416 installed" bash -c 'dotnet --list-sdks | grep 3.1.416' -# primary version plus 2 additional versions +# Primary version plus 2 additional versions check "latest version installed" bash -c 'test "$(dotnet --list-sdks | wc -l)" -eq 3' -# Report result reportResults diff --git a/test/dotnet/install_dotnet_3.sh b/test/dotnet/install_dotnet_3.sh index 077b8dc..5954876 100644 --- a/test/dotnet/install_dotnet_3.sh +++ b/test/dotnet/install_dotnet_3.sh @@ -2,12 +2,10 @@ set -e -# Optional: Import test library source dev-container-features-test-lib ./test.sh check "some major version of dotnet 3 is installed" bash -c "dotnet --list-sdks | grep '3\.[0-9]*\.[0-9]*'" -# Report result reportResults diff --git a/test/dotnet/install_dotnet_6_bullseye.sh b/test/dotnet/install_dotnet_6_bullseye.sh index 7bef5cc..e583374 100644 --- a/test/dotnet/install_dotnet_6_bullseye.sh +++ b/test/dotnet/install_dotnet_6_bullseye.sh @@ -2,12 +2,10 @@ set -e -# Optional: Import test library source dev-container-features-test-lib ./test.sh check "some major version of dotnet 6 is installed" bash -c "dotnet --list-sdks | grep '6\.[0-9]*\.[0-9]*'" -# Report result reportResults diff --git a/test/dotnet/install_dotnet_6_focal.sh b/test/dotnet/install_dotnet_6_focal.sh index 7bef5cc..e583374 100644 --- a/test/dotnet/install_dotnet_6_focal.sh +++ b/test/dotnet/install_dotnet_6_focal.sh @@ -2,12 +2,10 @@ set -e -# Optional: Import test library source dev-container-features-test-lib ./test.sh check "some major version of dotnet 6 is installed" bash -c "dotnet --list-sdks | grep '6\.[0-9]*\.[0-9]*'" -# Report result reportResults diff --git a/test/dotnet/install_dotnet_7_bullseye.sh b/test/dotnet/install_dotnet_7_bullseye.sh index 3f5b785..26ca007 100644 --- a/test/dotnet/install_dotnet_7_bullseye.sh +++ b/test/dotnet/install_dotnet_7_bullseye.sh @@ -2,12 +2,10 @@ set -e -# Optional: Import test library source dev-container-features-test-lib ./test.sh check "some major version of dotnet 7 is installed" bash -c "dotnet --list-sdks | grep '7\.[0-9]*\.[0-9]*'" -# Report result reportResults diff --git a/test/dotnet/install_dotnet_7_jammy.sh b/test/dotnet/install_dotnet_7_jammy.sh index 3f5b785..26ca007 100644 --- a/test/dotnet/install_dotnet_7_jammy.sh +++ b/test/dotnet/install_dotnet_7_jammy.sh @@ -2,12 +2,10 @@ set -e -# Optional: Import test library source dev-container-features-test-lib ./test.sh check "some major version of dotnet 7 is installed" bash -c "dotnet --list-sdks | grep '7\.[0-9]*\.[0-9]*'" -# Report result reportResults diff --git a/test/dotnet/install_dotnet_runtime.sh b/test/dotnet/install_dotnet_runtime.sh index f7f2752..73bbe9a 100644 --- a/test/dotnet/install_dotnet_runtime.sh +++ b/test/dotnet/install_dotnet_runtime.sh @@ -2,14 +2,12 @@ set -e -# Optional: Import test library source dev-container-features-test-lib -# some runtime installed +# Some runtime installed check "runtime" bash -c 'test "$(dotnet --list-runtimes | wc -l)" -gt 0' -# no sdk installed +# No sdk installed check "no sdk" bash -c 'test "$(dotnet --list-sdks | wc -l)" -eq 0' -# Report result reportResults diff --git a/test/dotnet/test.sh b/test/dotnet/test.sh index ebbdca8..e326d71 100755 --- a/test/dotnet/test.sh +++ b/test/dotnet/test.sh @@ -2,20 +2,19 @@ set -e -# Optional: Import test library source dev-container-features-test-lib -# Definition specific tests check "dotnet" dotnet --info check "sdks" dotnet --list-sdks check "version" dotnet --version -check "ls /usr/local/dotnet" bash -c 'test "$(ls /usr/local/dotnet | wc -l)" -gt 0' - # Verify current symlink exists and works check "current link dotnet" /usr/local/dotnet/current/dotnet --info check "current link sdks" /usr/local/dotnet/current/dotnet --list-sdks check "current link version" /usr/local/dotnet/current/dotnet --version -# Report result +# Verify installation location +check "dotnet in /usr/local/dotnet" bash -c 'test "$(ls /usr/local/dotnet | wc -l)" -gt 0' +check "sdks in /usr/local/dotnet/sdk" bash -c 'test "$(ls /usr/local/dotnet/current/sdk | wc -l)" -gt 0' + reportResults