aboutsummaryrefslogtreecommitdiff
path: root/test/dotnet
diff options
context:
space:
mode:
authorJP Ungaretti <git@jungaretti.com>2023-03-01 20:22:14 +0300
committerJP Ungaretti <git@jungaretti.com>2023-03-01 20:22:14 +0300
commit5bb6f303a1e23eeac37061a8025c5f04ce1eff86 (patch)
tree802cc2ad6e538d1b8807ff6684b3bd2844112d2d /test/dotnet
parent387dc5346eac3ed839bb1bf24c34baf5adf8fdec (diff)
Finishing touches
Diffstat (limited to 'test/dotnet')
-rw-r--r--test/dotnet/install_additional_dotnet.sh4
-rw-r--r--test/dotnet/install_dotnet_3.sh2
-rw-r--r--test/dotnet/install_dotnet_6_bullseye.sh2
-rw-r--r--test/dotnet/install_dotnet_6_focal.sh2
-rw-r--r--test/dotnet/install_dotnet_7_bullseye.sh2
-rw-r--r--test/dotnet/install_dotnet_7_jammy.sh2
-rw-r--r--test/dotnet/install_dotnet_runtime.sh6
-rwxr-xr-xtest/dotnet/test.sh9
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