Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.

Commit 76a240d

Browse files
committed
Drop .NET Core 2.1 tests, add .NET 6 tests, and upgrade test dependencies
1 parent a41cd87 commit 76a240d

13 files changed

+8
-46
lines changed

.config/dotnet-tools.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"isRoot": true,
44
"tools": {
55
"dotnet-format": {
6-
"version": "5.1.225507",
6+
"version": "5.1.250801",
77
"commands": [
88
"dotnet-format"
99
]
1010
}
1111
}
12-
}
12+
}

.github/workflows/ci.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ jobs:
3838

3939
steps:
4040
- uses: actions/checkout@v2
41-
- name: Setup .NET Core 2.1
42-
uses: actions/setup-dotnet@v1
43-
with:
44-
dotnet-version: "2.1.x"
4541
- name: Setup .NET Core 3.1
4642
uses: actions/setup-dotnet@v1
4743
with:

src/LettuceEncrypt/LettuceEncrypt.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ This only works with Kestrel, which is the default server configuration for ASP.
2626
<PackageReference Include="Certes" Version="2.3.4" />
2727
</ItemGroup>
2828

29-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
30-
<FrameworkReference Include="Microsoft.AspNetCore.App" />
31-
</ItemGroup>
32-
3329
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
3430
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.1.1" />
3531
<PackageReference Include="System.Text.Json" Version="5.0.2" />

test/LettuceEncrypt.Azure.UnitTests/AzureKeyVaultTests.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
using Moq;
1717
using Xunit;
1818

19-
#if NETCOREAPP2_1
20-
using IHostEnvironment = Microsoft.Extensions.Hosting.IHostingEnvironment;
21-
#endif
22-
2319
namespace LettuceEncrypt.Azure.UnitTests
2420
{
2521
public class AzureKeyVaultTests

test/LettuceEncrypt.Azure.UnitTests/ConfigurationBindingTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public void ExplicitOptionsWin()
6161
Assert.Equal("https://incode/", options.Value.AzureKeyVaultEndpoint);
6262
}
6363

64-
#if NETCOREAPP3_1_OR_GREATER
6564
[Theory]
6665
[InlineData(null)]
6766
[InlineData("")]
@@ -79,6 +78,5 @@ public void ItValidatesEndpointIsUrl(string invalidEndpoint)
7978
var ex = Assert.Throws<OptionsValidationException>(() => options.Value);
8079
Assert.Contains(nameof(AzureKeyVaultLettuceEncryptOptions.AzureKeyVaultEndpoint), ex.Message);
8180
}
82-
#endif
8381
}
8482
}

test/LettuceEncrypt.Azure.UnitTests/LettuceEncrypt.Azure.UnitTests.csproj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net5.0;netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="coverlet.collector" Version="3.0.3" />
8+
<PackageReference Include="coverlet.collector" Version="3.1.0" />
99
<PackageReference Include="McMaster.Extensions.Xunit" Version="0.1.0" />
10-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
10+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
1111
<PackageReference Include="Moq" Version="4.16.1" />
1212
<PackageReference Include="xunit" Version="2.4.1" />
1313
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
14-
<PackageReference Include="Microsoft.AspNetCore.App" Condition="'$(TargetFramework)' == 'netcoreapp2.1'" />
1514
</ItemGroup>
1615

1716
<ItemGroup>

test/LettuceEncrypt.UnitTests/ConfigurationBindingTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ public void ItParsesEnumValuesForChallengeType(string value, Acme.ChallengeType
6666
Assert.Equal(challengeType, options.AllowedChallengeTypes);
6767
}
6868

69-
#if NETCOREAPP3_1_OR_GREATER
7069
[Fact]
7170
public void DoesNotSupportWildcardDomains()
7271
{
@@ -76,7 +75,6 @@ public void DoesNotSupportWildcardDomains()
7675
["LettuceEncrypt:DomainNames:0"] = "*.natemcmaster.com",
7776
}));
7877
}
79-
#endif
8078

8179
private LettuceEncryptOptions ParseOptions(Dictionary<string, string> input)
8280
{

test/LettuceEncrypt.UnitTests/DefaultCertificateAuthorityConfigurationTests.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
using Microsoft.Extensions.Options;
1010
using Xunit;
1111

12-
#if NETCOREAPP2_1
13-
using Environments = Microsoft.Extensions.Hosting.EnvironmentName;
14-
#endif
15-
1612
namespace LettuceEncrypt.UnitTests
1713
{
1814
public class DefaultCertificateAuthorityConfigurationTests

test/LettuceEncrypt.UnitTests/DeveloperCertLoaderTests.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
using Microsoft.Extensions.Logging.Abstractions;
99
using Moq;
1010
using Xunit;
11-
#if NETCOREAPP2_1
12-
using IHostEnvironment = Microsoft.Extensions.Hosting.IHostingEnvironment;
13-
14-
#endif
1511

1612

1713
namespace LettuceEncrypt.UnitTests

test/LettuceEncrypt.UnitTests/FileSystemAccountStoreTests.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
using Moq;
1616
using Xunit;
1717

18-
#if NETCOREAPP2_1
19-
using IHostEnvironment = Microsoft.Extensions.Hosting.IHostingEnvironment;
20-
#endif
21-
2218
namespace LettuceEncrypt.UnitTests
2319
{
2420
public class FileSystemAccountStoreTests : IDisposable

0 commit comments

Comments
 (0)