Skip to content

Commit

Permalink
Drop .NET Core 2.1 tests, add .NET 6 tests, and upgrade test dependen…
Browse files Browse the repository at this point in the history
…cies
  • Loading branch information
natemcmaster committed Oct 13, 2021
1 parent a41cd87 commit 76a240d
Show file tree
Hide file tree
Showing 13 changed files with 8 additions and 46 deletions.
4 changes: 2 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"isRoot": true,
"tools": {
"dotnet-format": {
"version": "5.1.225507",
"version": "5.1.250801",
"commands": [
"dotnet-format"
]
}
}
}
}
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core 2.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: "2.1.x"
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
Expand Down
4 changes: 0 additions & 4 deletions src/LettuceEncrypt/LettuceEncrypt.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ This only works with Kestrel, which is the default server configuration for ASP.
<PackageReference Include="Certes" Version="2.3.4" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.1.1" />
<PackageReference Include="System.Text.Json" Version="5.0.2" />
Expand Down
4 changes: 0 additions & 4 deletions test/LettuceEncrypt.Azure.UnitTests/AzureKeyVaultTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
using Moq;
using Xunit;

#if NETCOREAPP2_1
using IHostEnvironment = Microsoft.Extensions.Hosting.IHostingEnvironment;
#endif

namespace LettuceEncrypt.Azure.UnitTests
{
public class AzureKeyVaultTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public void ExplicitOptionsWin()
Assert.Equal("https://incode/", options.Value.AzureKeyVaultEndpoint);
}

#if NETCOREAPP3_1_OR_GREATER
[Theory]
[InlineData(null)]
[InlineData("")]
Expand All @@ -79,6 +78,5 @@ public void ItValidatesEndpointIsUrl(string invalidEndpoint)
var ex = Assert.Throws<OptionsValidationException>(() => options.Value);
Assert.Contains(nameof(AzureKeyVaultLettuceEncryptOptions.AzureKeyVaultEndpoint), ex.Message);
}
#endif
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5.0;netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="3.0.3" />
<PackageReference Include="coverlet.collector" Version="3.1.0" />
<PackageReference Include="McMaster.Extensions.Xunit" Version="0.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
<PackageReference Include="Microsoft.AspNetCore.App" Condition="'$(TargetFramework)' == 'netcoreapp2.1'" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 0 additions & 2 deletions test/LettuceEncrypt.UnitTests/ConfigurationBindingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public void ItParsesEnumValuesForChallengeType(string value, Acme.ChallengeType
Assert.Equal(challengeType, options.AllowedChallengeTypes);
}

#if NETCOREAPP3_1_OR_GREATER
[Fact]
public void DoesNotSupportWildcardDomains()
{
Expand All @@ -76,7 +75,6 @@ public void DoesNotSupportWildcardDomains()
["LettuceEncrypt:DomainNames:0"] = "*.natemcmaster.com",
}));
}
#endif

private LettuceEncryptOptions ParseOptions(Dictionary<string, string> input)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
using Microsoft.Extensions.Options;
using Xunit;

#if NETCOREAPP2_1
using Environments = Microsoft.Extensions.Hosting.EnvironmentName;
#endif

namespace LettuceEncrypt.UnitTests
{
public class DefaultCertificateAuthorityConfigurationTests
Expand Down
4 changes: 0 additions & 4 deletions test/LettuceEncrypt.UnitTests/DeveloperCertLoaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
using Microsoft.Extensions.Logging.Abstractions;
using Moq;
using Xunit;
#if NETCOREAPP2_1
using IHostEnvironment = Microsoft.Extensions.Hosting.IHostingEnvironment;

#endif


namespace LettuceEncrypt.UnitTests
Expand Down
4 changes: 0 additions & 4 deletions test/LettuceEncrypt.UnitTests/FileSystemAccountStoreTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
using Moq;
using Xunit;

#if NETCOREAPP2_1
using IHostEnvironment = Microsoft.Extensions.Hosting.IHostingEnvironment;
#endif

namespace LettuceEncrypt.UnitTests
{
public class FileSystemAccountStoreTests : IDisposable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Hosting.Internal;
using Xunit;
#if NETCOREAPP2_1
using IHostEnvironment = Microsoft.Extensions.Hosting.IHostingEnvironment;

#endif

namespace LettuceEncrypt.UnitTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
using Microsoft.Extensions.DependencyInjection.Extensions;
using Moq;
using Xunit;
#if NETCOREAPP2_1
using ApplicationBuilder = Microsoft.AspNetCore.Builder.Internal.ApplicationBuilder;

#endif

namespace LettuceEncrypt.UnitTests
{
Expand Down
7 changes: 3 additions & 4 deletions test/LettuceEncrypt.UnitTests/LettuceEncrypt.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5.0;netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="3.0.3" />
<PackageReference Include="coverlet.collector" Version="3.1.0" />
<PackageReference Include="McMaster.Extensions.Xunit" Version="0.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
<PackageReference Include="Microsoft.AspNetCore.App" Condition="'$(TargetFramework)' == 'netcoreapp2.1'" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 76a240d

Please sign in to comment.