Skip to content

Commit

Permalink
Added test to see if dotnet 6.0 still works
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaniska244 committed Dec 17, 2024
1 parent b4eae7e commit 68ae7cb
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
3 changes: 3 additions & 0 deletions test/dotnet/install_dotnet_multiple_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ is_dotnet_sdk_version_installed "8.0"
check ".NET SDK 7.0 installed" \
is_dotnet_sdk_version_installed "7.0"

check ".NET SDK 6.0 installed" \
is_dotnet_sdk_version_installed "6.0"

check "Build example class library" \
dotnet build projects/multitargeting

Expand Down
27 changes: 27 additions & 0 deletions test/dotnet/install_dotnet_six.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

set -e

# Optional: Import test library bundled with the devcontainer CLI
# See https://github.com/devcontainers/cli/blob/HEAD/docs/features/test.md#dev-container-features-test-lib
# Provides the 'check' and 'reportResults' commands.
source dev-container-features-test-lib

# Feature-specific tests
# The 'check' command comes from the dev-container-features-test-lib. Syntax is...
# check <LABEL> <cmd> [args...]
source dotnet_env.sh
source dotnet_helpers.sh

expected=$(fetch_latest_version_in_channel "6.0")

check ".NET Core SDK 6.0 installed" \
is_dotnet_sdk_version_installed "$expected"

check "Build and run example project" \
dotnet run --project projects/net6.0

# Report results
# If any of the checks above exited with a non-zero exit code, the test will fail.
reportResults

12 changes: 11 additions & 1 deletion test/dotnet/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@
}
}
},
"install_dotnet_six": {
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04",
"remoteUser": "vscode",
"features": {
"dotnet": {
"version": "6.0"
}
}
},
"install_dotnet_specific_release_and_feature_band": {
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-20.04",
"remoteUser": "vscode",
Expand All @@ -42,7 +51,8 @@
"dotnet": {
"version": "8.0.100-preview.6.23330.14",
"additionalVersions": [
"7.0"
"7.0",
"6.0"
]
}
}
Expand Down

0 comments on commit 68ae7cb

Please sign in to comment.