Skip to content

Commit d94e2e4

Browse files
authored
Upgrade E2E tests to Core Tools v4.0.7317 (#88)
While trying to upgrade to PowerShell 7.4 and .NET 8, I discovered that Core Tools builds are not published to the same internal location anymore. As a result, the E2E tests were using a very old version of Core Tools, which led to test failures. This PR makes the E2E tests use Core Tools v4.0.7317 (the latest officially published version), and it also removes the `UseCoreToolsBuildFromIntegrationTests` support. In the future, we may want to find another way of retrieving the latest version, especially for the purposes of internal integration tests. However, I believe public tests on GitHub should rely on officially published Core Tools versions, and we should upgrade this dependency the same way as we upgrade other dependencies: with an explicit version bump.
1 parent b95c685 commit d94e2e4

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

test/E2E/Start-E2ETest.ps1

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ param
77
[Switch]
88
$NoBuild,
99
[Switch]
10-
$UseCoreToolsBuildFromIntegrationTests,
11-
[Switch]
1210
$SkipCoreToolsDownload
1311
)
1412

@@ -63,6 +61,7 @@ function NewTaskHubName
6361
$FUNC_RUNTIME_VERSION = '4'
6462
$POWERSHELL_VERSION = '7.2'
6563
$FUNC_CMDLET_NAME = "func"
64+
$CORE_TOOLS_VERSION = '4.0.7317'
6665

6766
# Set the appropriate environment variables
6867
$taskHubName = NewTaskHubName -Length 45
@@ -108,23 +107,9 @@ Remove-Item -Recurse -Force $FUNC_CLI_DIRECTORY -ErrorAction Ignore
108107
if (-not $SkipCoreToolsDownload)
109108
{
110109
Write-Host "Downloading Core Tools because SkipCoreToolsDownload switch parameter is not present..."
111-
$coreToolsDownloadURL = $null
112-
if ($UseCoreToolsBuildFromIntegrationTests)
113-
{
114-
$coreToolsDownloadURL = "https://functionsintegclibuilds.blob.core.windows.net/builds/$FUNC_RUNTIME_VERSION/latest/Azure.Functions.Cli.$os-$arch.zip"
115-
$env:CORE_TOOLS_URL = "https://functionsintegclibuilds.blob.core.windows.net/builds/$FUNC_RUNTIME_VERSION/latest"
116-
}
117-
else
118-
{
119-
$coreToolsDownloadURL = "https://functionsclibuilds.blob.core.windows.net/builds/$FUNC_RUNTIME_VERSION/latest/Azure.Functions.Cli.$os-$arch.zip"
120-
if (-not $env:CORE_TOOLS_URL)
121-
{
122-
$env:CORE_TOOLS_URL = "https://functionsclibuilds.blob.core.windows.net/builds/$FUNC_RUNTIME_VERSION/latest"
123-
}
124-
}
125110

126-
$version = Invoke-RestMethod -Uri "$env:CORE_TOOLS_URL/version.txt"
127-
Write-Host "Downloading Functions Core Tools (Version: $version)..."
111+
$coreToolsDownloadURL = "https://github.com/Azure/azure-functions-core-tools/releases/download/$CORE_TOOLS_VERSION/Azure.Functions.Cli.$os-$arch.$CORE_TOOLS_VERSION.zip"
112+
Write-Host "Downloading Functions Core Tools (Version: $CORE_TOOLS_VERSION)..."
128113

129114
$output = "$FUNC_CLI_DIRECTORY.zip"
130115
Invoke-RestMethod -Uri $coreToolsDownloadURL -OutFile $output

0 commit comments

Comments
 (0)