aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/dotnet/install_additional_dotnet.sh10
-rw-r--r--test/dotnet/install_dotnet_3.sh8
-rw-r--r--test/dotnet/install_dotnet_5.sh14
-rw-r--r--test/dotnet/install_dotnet_6_bullseye.sh17
-rw-r--r--test/dotnet/install_dotnet_6_focal.sh17
-rw-r--r--test/dotnet/install_dotnet_7_bullseye.sh17
-rw-r--r--test/dotnet/install_dotnet_7_jammy.sh17
-rw-r--r--test/dotnet/install_dotnet_latest.sh17
-rw-r--r--test/dotnet/install_dotnet_lts.sh17
-rw-r--r--test/dotnet/install_wo_apt.sh17
-rw-r--r--test/dotnet/scenarios.json53
-rwxr-xr-xtest/dotnet/test.sh6
12 files changed, 188 insertions, 22 deletions
diff --git a/test/dotnet/install_additional_dotnet.sh b/test/dotnet/install_additional_dotnet.sh
index fdb2da7..e69c7dc 100644
--- a/test/dotnet/install_additional_dotnet.sh
+++ b/test/dotnet/install_additional_dotnet.sh
@@ -5,9 +5,13 @@ set -e
# Optional: Import test library
source dev-container-features-test-lib
-check "dotnet version 6.0.301 installed as default" dotnet --version | grep 6.0.301
-check "dotnet version 5.0 installed" ls -l /usr/local/dotnet | grep 5.0
-check "dotnet version 3.1.420 installed" ls -l /usr/local/dotnet | grep 3.1.420
+check "dotnet version 6.0.301 installed as default" bash -c "dotnet --version | grep 6.0.301"
+check "dotnet version 5.0 installed" bash -c "ls -l /usr/local/dotnet | grep 5.0"
+check "dotnet version 3.1.420 installed" bash -c "ls -l /usr/local/dotnet | grep 3.1.420"
+
+# 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_3.sh b/test/dotnet/install_dotnet_3.sh
index 0d05215..51d871b 100644
--- a/test/dotnet/install_dotnet_3.sh
+++ b/test/dotnet/install_dotnet_3.sh
@@ -6,8 +6,12 @@ set -e
source dev-container-features-test-lib
check "dotnet sdks" dotnet --list-sdks
-check "some major version of dotnet 3 is installed" dotnet --list-sdks | grep '3\.[0-9]*\.[0-9]*'
-check "dotnet version 3 installed" ls -l /usr/share/dotnet/sdk | grep '3\.[0-9]*\.[0-9]*'
+check "some major version of dotnet 3 is installed" bash -c "dotnet --list-sdks | grep '3\.[0-9]*\.[0-9]*'"
+check "dotnet version 3 installed" bash -c "ls -l /usr/share/dotnet/sdk | grep '3\.[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_5.sh b/test/dotnet/install_dotnet_5.sh
deleted file mode 100644
index 5f48eb1..0000000
--- a/test/dotnet/install_dotnet_5.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/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 5 is installed" dotnet --list-sdks | grep '5\.[0-9]*\.[0-9]*'
-check "dotnet version 5 installed" ls -l /usr/share/dotnet/sdk | grep '5\.[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
new file mode 100644
index 0000000..758f040
--- /dev/null
+++ b/test/dotnet/install_dotnet_6_bullseye.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/share/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_6_focal.sh b/test/dotnet/install_dotnet_6_focal.sh
new file mode 100644
index 0000000..758f040
--- /dev/null
+++ b/test/dotnet/install_dotnet_6_focal.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/share/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_bullseye.sh b/test/dotnet/install_dotnet_7_bullseye.sh
new file mode 100644
index 0000000..2c015fc
--- /dev/null
+++ b/test/dotnet/install_dotnet_7_bullseye.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 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]*'"
+
+# 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
new file mode 100644
index 0000000..2c015fc
--- /dev/null
+++ b/test/dotnet/install_dotnet_7_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 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]*'"
+
+# 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_latest.sh b/test/dotnet/install_dotnet_latest.sh
new file mode 100644
index 0000000..2c015fc
--- /dev/null
+++ b/test/dotnet/install_dotnet_latest.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 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]*'"
+
+# 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_lts.sh b/test/dotnet/install_dotnet_lts.sh
new file mode 100644
index 0000000..758f040
--- /dev/null
+++ b/test/dotnet/install_dotnet_lts.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/share/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_wo_apt.sh b/test/dotnet/install_wo_apt.sh
new file mode 100644
index 0000000..a1745c5
--- /dev/null
+++ b/test/dotnet/install_wo_apt.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 7 is installed" bash -c "dotnet --list-sdks | grep '7\.[0-9]*\.[0-9]*'"
+check "dotnet version 7 installed" bash -c "ls -l /usr/local/dotnet | grep '7\.[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/scenarios.json b/test/dotnet/scenarios.json
index edf4a75..37f83d5 100644
--- a/test/dotnet/scenarios.json
+++ b/test/dotnet/scenarios.json
@@ -16,11 +16,60 @@
}
}
},
- "install_dotnet_5": {
+ "install_dotnet_6_bullseye": {
+ "image": "debian:bullseye",
+ "features": {
+ "dotnet": {
+ "version": "6"
+ }
+ }
+ },
+ "install_dotnet_6_focal": {
"image": "ubuntu:focal",
"features": {
"dotnet": {
- "version": "5"
+ "version": "6"
+ }
+ }
+ },
+ "install_dotnet_7_bullseye": {
+ "image": "debian:bullseye",
+ "features": {
+ "dotnet": {
+ "version": "7"
+ }
+ }
+ },
+ "install_dotnet_7_jammy": {
+ "image": "ubuntu:jammy",
+ "features": {
+ "dotnet": {
+ "version": "7"
+ }
+ }
+ },
+ "install_dotnet_latest": {
+ "image": "ubuntu:jammy",
+ "features": {
+ "dotnet": {
+ "version": "latest"
+ }
+ }
+ },
+ "install_dotnet_lts": {
+ "image": "ubuntu:focal",
+ "features": {
+ "dotnet": {
+ "version": "lts"
+ }
+ }
+ },
+ "install_wo_apt": {
+ "image": "ubuntu:jammy",
+ "features": {
+ "dotnet": {
+ "version": "7",
+ "installUsingApt": false
}
}
}
diff --git a/test/dotnet/test.sh b/test/dotnet/test.sh
index a16f91d..7eb0cf6 100755
--- a/test/dotnet/test.sh
+++ b/test/dotnet/test.sh
@@ -11,7 +11,11 @@ check "sdks" dotnet --list-sdks
check "version" dotnet --version
echo "Validating expected version present..."
-check "some major version of dotnet 6 is installed" dotnet --version | grep '6\.[0-9]*\.[0-9]*'
+check "some major version of dotnet 7 is installed" bash -c "dotnet --version | grep '7\.[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 \ No newline at end of file