Skip to content

Commit cb2f71d

Browse files
authored
Make E2E tests run on Functions V3 runtime (#392)
* Use Functions CLI V3 in E2E tests * Set AzureWebJobsFeatureFlags to AllowSynchronousIO for the E2E test app * Make E2E test app depend on DurableTask v1.8.2 (to stay on Durable v1)
1 parent db53cfa commit cb2f71d

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

test/E2E/Start-E2ETest.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
44
#
55

6+
$FUNC_RUNTIME_VERSION = '3'
7+
68
$arch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLowerInvariant()
79
if ($IsWindows) {
810
$FUNC_EXE_NAME = "func.exe"
@@ -16,7 +18,7 @@ if ($IsWindows) {
1618
}
1719
}
1820

19-
$FUNC_CLI_DOWNLOAD_URL = "https://functionsclibuilds.blob.core.windows.net/builds/2/latest/Azure.Functions.Cli.$os-$arch.zip"
21+
$FUNC_CLI_DOWNLOAD_URL = "https://functionsclibuilds.blob.core.windows.net/builds/$FUNC_RUNTIME_VERSION/latest/Azure.Functions.Cli.$os-$arch.zip"
2022
$FUNC_CLI_DIRECTORY = Join-Path $PSScriptRoot 'Azure.Functions.Cli'
2123

2224
Write-Host 'Deleting Functions Core Tools if exists...'
@@ -25,7 +27,7 @@ Remove-Item -Recurse -Force $FUNC_CLI_DIRECTORY -ErrorAction Ignore
2527

2628
if (-not $env:CORE_TOOLS_URL)
2729
{
28-
$env:CORE_TOOLS_URL = 'https://functionsclibuilds.blob.core.windows.net/builds/2/latest'
30+
$env:CORE_TOOLS_URL = "https://functionsclibuilds.blob.core.windows.net/builds/$FUNC_RUNTIME_VERSION/latest"
2931
}
3032

3133
$version = Invoke-RestMethod -Uri "$env:CORE_TOOLS_URL/version.txt"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFramework>netstandard2.0</TargetFramework>
4+
<WarningsAsErrors></WarningsAsErrors>
5+
<DefaultItemExcludes>**</DefaultItemExcludes>
6+
</PropertyGroup>
7+
<ItemGroup>
8+
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask" Version="1.8.2" />
9+
</ItemGroup>
10+
</Project>

test/E2E/TestFunctionApp/local.settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"Values": {
44
"AzureWebJobsEventHubSender":"",
55
"AzureWebJobsCosmosDBConnectionString":"",
6+
"AzureWebJobsFeatureFlags": "AllowSynchronousIO",
67
"FUNCTIONS_WORKER_RUNTIME": "powershell",
78
"PSWorkerEnableExperimentalDurableFunctions": "true"
89
}

0 commit comments

Comments
 (0)