Skip to content

Commit

Permalink
Updates console app to .NET 8. Fixes non-deterministic test.
Browse files Browse the repository at this point in the history
  • Loading branch information
alanedwardes committed Aug 2, 2024
1 parent e1c502c commit 8e05418
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
2.1.x
3.1.x
6.0.x
8.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x

- name: Build for ARM64
run: dotnet publish misc/Ae.Dns.Console/Ae.Dns.Console.csproj --configuration Release --runtime linux-arm64 --output build/linux/arm64
Expand Down
2 changes: 1 addition & 1 deletion misc/Ae.Dns.Console/Ae.Dns.Console.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down
4 changes: 2 additions & 2 deletions misc/Ae.Dns.Console/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,10 @@ string CreateQueryStringWithout(string name)
switch (hostFilter)
{
case "match":
query = query.Where(x => x.Query.Host.Contains(context.Request.Query["host"], StringComparison.InvariantCultureIgnoreCase));
query = query.Where(x => x.Query.Host.Contains(context.Request.Query["host"]!, StringComparison.InvariantCultureIgnoreCase));
break;
case "suffix":
query = query.Where(x => x.Query.Host.EndsWith(context.Request.Query["host"], StringComparison.InvariantCultureIgnoreCase));
query = query.Where(x => x.Query.Host.EndsWith(context.Request.Query["host"]!, StringComparison.InvariantCultureIgnoreCase));
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Ae.Dns.Tests/Client/DnsClientGenericTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private static async Task TestClientLargeResponse1(IDnsClient client, bool trunc
}
else
{
var answers = result.Answers.Select(x => x.Resource).Cast<DnsStringResource>().Select(x => x.Entries.Single()).ToArray();
var answers = result.Answers.Select(x => x.Resource).Cast<DnsStringResource>().Select(x => x.Entries.Single()).OrderBy(x => x).ToArray();

Assert.Equal(29, answers.Length);

Expand Down

0 comments on commit 8e05418

Please sign in to comment.