diff options
author | Chuck Lantz <clantz@microsoft.com> | 2022-11-14 22:41:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-14 22:41:32 +0300 |
commit | 17580ee22f38b3a16e6531a8139629fd2fd8234a (patch) | |
tree | d18d553e14e92dec4ccfe9b6ca3e4ccb6a1ec50f /test | |
parent | 258b107b39db9f28703bf6bfeed3102d54e1cafe (diff) |
Add .NET 7, drop .NET 5 (#269)
* Add .NET 7, drop .NET 5
* Add libssl3 to common-utils for jammy
* Handle lts/latest hard coding
* Fix, improve tests
* Bump version
* Fix situation where version could come from either MS repo or OS
* Remove unused option
* Bump common version
* Remove unused function
* Restore DOTNET_ROOT per feedback
Diffstat (limited to 'test')
-rw-r--r-- | test/dotnet/install_additional_dotnet.sh | 10 | ||||
-rw-r--r-- | test/dotnet/install_dotnet_3.sh | 8 | ||||
-rw-r--r-- | test/dotnet/install_dotnet_5.sh | 14 | ||||
-rw-r--r-- | test/dotnet/install_dotnet_6_bullseye.sh | 17 | ||||
-rw-r--r-- | test/dotnet/install_dotnet_6_focal.sh | 17 | ||||
-rw-r--r-- | test/dotnet/install_dotnet_7_bullseye.sh | 17 | ||||
-rw-r--r-- | test/dotnet/install_dotnet_7_jammy.sh | 17 | ||||
-rw-r--r-- | test/dotnet/install_dotnet_latest.sh | 17 | ||||
-rw-r--r-- | test/dotnet/install_dotnet_lts.sh | 17 | ||||
-rw-r--r-- | test/dotnet/install_wo_apt.sh | 17 | ||||
-rw-r--r-- | test/dotnet/scenarios.json | 53 | ||||
-rwxr-xr-x | test/dotnet/test.sh | 6 |
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 |