Fixup kestrel config tests after feedback (#23308)

This commit is contained in:
William Godbe 2020-06-24 12:59:33 -07:00 committed by GitHub
parent dad1ca68d7
commit cd9da1c350
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -5,6 +5,7 @@ using System;
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;
@ -74,7 +75,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Tests
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;
@ -98,7 +99,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Tests
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]