|
1 |
| -using Microsoft.AspNetCore.Authentication; |
2 |
| -using Microsoft.Extensions.DependencyInjection; |
3 |
| -using Microsoft.Extensions.Logging; |
4 |
| -using Microsoft.Extensions.Options; |
5 |
| -using Moq; |
6 |
| -using Ocelot.Configuration.File; |
7 |
| -using Ocelot.Configuration.Validator; |
8 |
| -using Ocelot.Requester; |
9 |
| -using Ocelot.Responses; |
10 |
| -using Ocelot.ServiceDiscovery; |
11 |
| -using Ocelot.ServiceDiscovery.Providers; |
12 |
| -using Ocelot.UnitTests.Requester; |
13 |
| -using Ocelot.Values; |
14 |
| -using Shouldly; |
15 |
| -using System.Collections.Generic; |
16 |
| -using System.Security.Claims; |
17 |
| -using System.Text.Encodings.Web; |
18 |
| -using System.Threading.Tasks; |
19 |
| -using TestStack.BDDfy; |
| 1 | +using Microsoft.AspNetCore.Authentication; |
| 2 | +using Microsoft.Extensions.DependencyInjection; |
| 3 | +using Microsoft.Extensions.Logging; |
| 4 | +using Microsoft.Extensions.Options; |
| 5 | +using Moq; |
| 6 | +using Ocelot.Configuration.File; |
| 7 | +using Ocelot.Configuration.Validator; |
| 8 | +using Ocelot.Requester; |
| 9 | +using Ocelot.Responses; |
| 10 | +using Ocelot.ServiceDiscovery; |
| 11 | +using Ocelot.ServiceDiscovery.Providers; |
| 12 | +using Ocelot.UnitTests.Requester; |
| 13 | +using Ocelot.Values; |
| 14 | +using Shouldly; |
| 15 | +using System.Collections.Generic; |
| 16 | +using System.Security.Claims; |
| 17 | +using System.Text.Encodings.Web; |
| 18 | +using System.Threading.Tasks; |
| 19 | +using TestStack.BDDfy; |
20 | 20 | using Xunit;
|
21 | 21 |
|
22 | 22 | namespace Ocelot.UnitTests.Configuration.Validation
|
@@ -956,7 +956,7 @@ public void configuration_is_invalid_with_invalid_authentication_provider()
|
956 | 956 | }))
|
957 | 957 | .When(x => x.WhenIValidateTheConfiguration())
|
958 | 958 | .Then(x => x.ThenTheResultIsNotValid())
|
959 |
| - .And(x => x.ThenTheErrorMessageAtPositionIs(0, "Authentication Options AuthenticationProviderKey:Test,AllowedScopes:[] is unsupported authentication provider")) |
| 959 | + .And(x => x.ThenTheErrorMessageAtPositionIs(0, "Authentication Options AuthenticationProviderKey:Test,AllowedScopes:[],RequiredRole:[],ScopeKey:[],RoleKey:[],PolicyName:[] is unsupported authentication provider")) |
960 | 960 | .BDDfy();
|
961 | 961 | }
|
962 | 962 |
|
@@ -1244,8 +1244,8 @@ public void configuration_is_valid_with_duplicate_routes_but_one_upstreamhost_is
|
1244 | 1244 | .When(x => x.WhenIValidateTheConfiguration())
|
1245 | 1245 | .Then(x => x.ThenTheResultIsValid())
|
1246 | 1246 | .BDDfy();
|
1247 |
| - } |
1248 |
| - |
| 1247 | + } |
| 1248 | + |
1249 | 1249 | [Fact]
|
1250 | 1250 | public void configuration_is_invalid_with_invalid_rate_limit_configuration()
|
1251 | 1251 | {
|
@@ -1486,8 +1486,8 @@ public void configuration_is_invalid_when_placeholder_is_used_twice_in_upstream_
|
1486 | 1486 | {
|
1487 | 1487 | DownstreamPathTemplate = "/bar/{everything}",
|
1488 | 1488 | DownstreamScheme = "http",
|
1489 |
| - DownstreamHostAndPorts = new List<FileHostAndPort> |
1490 |
| - { |
| 1489 | + DownstreamHostAndPorts = new List<FileHostAndPort> |
| 1490 | + { |
1491 | 1491 | new() { Host = "a.b.cd" },
|
1492 | 1492 | },
|
1493 | 1493 | UpstreamPathTemplate = "/foo/bar/{everything}/{everything}",
|
|
0 commit comments