Skip to content

Commit cd9da1c

Browse files
authored
Fixup kestrel config tests after feedback (dotnet#23308)
1 parent dad1ca6 commit cd9da1c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Servers/Kestrel/Kestrel/test/ConfigurationReaderTests.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Collections.Generic;
66
using System.Linq;
77
using System.Security.Authentication;
8+
using Microsoft.AspNetCore.Server.Kestrel.Core;
89
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal;
910
using Microsoft.Extensions.Configuration;
1011
using Xunit;
@@ -74,7 +75,7 @@ public void ReadCertificatesSection_IsCaseInsensitive()
7475
var config = new ConfigurationBuilder().AddInMemoryCollection(new[]
7576
{
7677
new KeyValuePair<string, string>("Certificates:filecert:Path", "/path/cert.pfx"),
77-
new KeyValuePair<string, string>("Certificates:FILECERT:Password", "certpassword"),
78+
new KeyValuePair<string, string>("CERTIFICATES:FILECERT:PASSWORD", "certpassword"),
7879
}).Build();
7980
var reader = new ConfigurationReader(config);
8081
var certificates = reader.Certificates;
@@ -98,7 +99,7 @@ public void ReadCertificatesSection_ThrowsOnCaseInsensitiveDuplicate()
9899
new KeyValuePair<string, string>("Certificates:FILECERT:Password", "certpassword"),
99100
}).Build());
100101

101-
Assert.Contains("An item with the same key has already been added", exception.Message);
102+
Assert.Contains(CoreStrings.KeyAlreadyExists, exception.Message);
102103
}
103104

104105
[Fact]

0 commit comments

Comments
 (0)