Skip to content

Fixup kestrel config tests after feedback #23308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Servers/Kestrel/Kestrel/test/ConfigurationReaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Security.Authentication;
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal;
using Microsoft.Extensions.Configuration;
using Xunit;
Expand Down Expand Up @@ -74,7 +75,7 @@ public void ReadCertificatesSection_IsCaseInsensitive()
var config = new ConfigurationBuilder().AddInMemoryCollection(new[]
{
new KeyValuePair<string, string>("Certificates:filecert:Path", "/path/cert.pfx"),
new KeyValuePair<string, string>("Certificates:FILECERT:Password", "certpassword"),
new KeyValuePair<string, string>("CERTIFICATES:FILECERT:PASSWORD", "certpassword"),
}).Build();
var reader = new ConfigurationReader(config);
var certificates = reader.Certificates;
Expand All @@ -98,7 +99,7 @@ public void ReadCertificatesSection_ThrowsOnCaseInsensitiveDuplicate()
new KeyValuePair<string, string>("Certificates:FILECERT:Password", "certpassword"),
}).Build());

Assert.Contains("An item with the same key has already been added", exception.Message);
Assert.Contains(CoreStrings.KeyAlreadyExists, exception.Message);
}

[Fact]
Expand Down