Skip to content

Commit 7368f7d

Browse files
authored
Add tests for isolated functions, and update tests to .NET 8.0 (#427)
* Add .NET 8.0 isolated function alongside .NET 6.0 in-proc function * Improve robustness of function launch code: now handling a race condition in which an earlier test was somehow hanging onto the port even though we waited until the function host exited * Bump to v3 because the launch robustness improvements are technically a breaking change * added positive verification that connections are being accepted on the expected port number before proceeding * Also updated some copyright dates, and fixed an old AzureFunctionsVersion setting. * Remove Moq dependency * Update other package references * Resolve diagnostic messages * Upgrade test and demo projects to .NET 8.0 * Set IsTestProject to false on non-test projects
1 parent efd3dcd commit 7368f7d

File tree

49 files changed

+2332
-2647
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2332
-2647
lines changed

GitVersion.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ branches:
2020
- feature
2121
- support
2222
- hotfix
23-
next-version: "2.1"
23+
next-version: "3.0"
2424

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
This provides a library of useful testing extensions, primarily focussed on SpecFlow operations.
77

8-
It is built for .NET 6.0. (If you require .NET Standard 2.0, use `Corvus.Testing` v1.)
8+
It is built for .NET 6.0, and we support use on both .NET 6.0 and .NET 8.0. (If you require .NET Standard 2.0, use `Corvus.Testing` v1.)
99

1010
The SpecFlow specific libraries contain additional bindings; to use these, you will need to add a `specflow.json` file to any project wishing to use them. Add entries to the `stepAssemblies` array for each of the Corvus libraries you need to use:
1111

Solutions/.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,9 @@ dotnet_diagnostic.RCS1194.severity = None
100100

101101
# Localize string constants - apps that want localization can turn this back on
102102
dotnet_diagnostic.CA1303.severity = None
103+
104+
# Collection initialization can be simplified - this wants dictionary construction to be replaced with [], which seems incongruous when you can't use that for anything other than an empty dictionary.
105+
dotnet_diagnostic.IDE0028.severity = Silent
106+
107+
# Use primary constructor - this does not always seem to be an improvement
108+
dotnet_diagnostic.IDE0290.severity = Silent

Solutions/Corvus.Testing.AzureFunctions.DemoFunction/Corvus.Testing.AzureFunctions.DemoFunction.csproj renamed to Solutions/Corvus.Testing.AzureFunctions.DemoFunction.InProcess/Corvus.Testing.AzureFunctions.DemoFunctions.InProcess.csproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@
55
<PropertyGroup>
66
<TargetFramework>net6.0</TargetFramework>
77
<Nullable>enable</Nullable>
8-
<AzureFunctionsVersion>v3</AzureFunctionsVersion>
8+
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
99
<IsPackable>false</IsPackable>
1010
</PropertyGroup>
1111

12+
<PropertyGroup>
13+
<IsTestProject>false</IsTestProject>
14+
</PropertyGroup>
15+
1216
<PropertyGroup>
1317
<!--
1418
This project tests runnable artifacts. To ensure repeatability, we need floating versions in
@@ -34,7 +38,7 @@
3438
</PropertyGroup>
3539

3640
<ItemGroup>
37-
<PackageReference Include="Endjin.RecommendedPractices.GitHub" Version="2.1.7">
41+
<PackageReference Include="Endjin.RecommendedPractices.GitHub" Version="2.1.9">
3842
<PrivateAssets>all</PrivateAssets>
3943
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4044
</PackageReference>

Solutions/Corvus.Testing.AzureFunctions.DemoFunction/SampleFunction.cs renamed to Solutions/Corvus.Testing.AzureFunctions.DemoFunction.InProcess/SampleFunction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Copyright (c) Endjin Limited. All rights reserved.
33
// </copyright>
44

5-
namespace Corvus.Testing.SpecFlow.DemoFunction
5+
namespace Corvus.Testing.SpecFlow.DemoFunction.InProcess
66
{
77
using System.IO;
88
using System.Threading.Tasks;

Solutions/Corvus.Testing.AzureFunctions.DemoFunction/host.json renamed to Solutions/Corvus.Testing.AzureFunctions.DemoFunction.InProcess/host.json

File renamed without changes.

Solutions/Corvus.Testing.AzureFunctions.DemoFunction/local.settings.json renamed to Solutions/Corvus.Testing.AzureFunctions.DemoFunction.InProcess/local.settings.json

File renamed without changes.

0 commit comments

Comments
 (0)