Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
Fixed test configuration_is_invalid_with_invalid_authentication_provider()
  • Loading branch information
Eits-Ian committed Aug 24, 2023
1 parent a621c07 commit 6e768d0
Showing 1 changed file with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
using Microsoft.AspNetCore.Authentication;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Moq;
using Ocelot.Configuration.File;
using Ocelot.Configuration.Validator;
using Ocelot.Requester;
using Ocelot.Responses;
using Ocelot.ServiceDiscovery;
using Ocelot.ServiceDiscovery.Providers;
using Ocelot.UnitTests.Requester;
using Ocelot.Values;
using Shouldly;
using System.Collections.Generic;
using System.Security.Claims;
using System.Text.Encodings.Web;
using System.Threading.Tasks;
using TestStack.BDDfy;
using Microsoft.AspNetCore.Authentication;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Moq;
using Ocelot.Configuration.File;
using Ocelot.Configuration.Validator;
using Ocelot.Requester;
using Ocelot.Responses;
using Ocelot.ServiceDiscovery;
using Ocelot.ServiceDiscovery.Providers;
using Ocelot.UnitTests.Requester;
using Ocelot.Values;
using Shouldly;
using System.Collections.Generic;
using System.Security.Claims;
using System.Text.Encodings.Web;
using System.Threading.Tasks;
using TestStack.BDDfy;
using Xunit;

namespace Ocelot.UnitTests.Configuration.Validation
Expand Down Expand Up @@ -956,7 +956,7 @@ public void configuration_is_invalid_with_invalid_authentication_provider()
}))
.When(x => x.WhenIValidateTheConfiguration())
.Then(x => x.ThenTheResultIsNotValid())
.And(x => x.ThenTheErrorMessageAtPositionIs(0, "Authentication Options AuthenticationProviderKey:Test,AllowedScopes:[] is unsupported authentication provider"))
.And(x => x.ThenTheErrorMessageAtPositionIs(0, "Authentication Options AuthenticationProviderKey:Test,AllowedScopes:[],RequiredRole:[],ScopeKey:[],RoleKey:[],PolicyName:[] is unsupported authentication provider"))
.BDDfy();
}

Expand Down Expand Up @@ -1244,8 +1244,8 @@ public void configuration_is_valid_with_duplicate_routes_but_one_upstreamhost_is
.When(x => x.WhenIValidateTheConfiguration())
.Then(x => x.ThenTheResultIsValid())
.BDDfy();
}

}

[Fact]
public void configuration_is_invalid_with_invalid_rate_limit_configuration()
{
Expand Down Expand Up @@ -1486,8 +1486,8 @@ public void configuration_is_invalid_when_placeholder_is_used_twice_in_upstream_
{
DownstreamPathTemplate = "/bar/{everything}",
DownstreamScheme = "http",
DownstreamHostAndPorts = new List<FileHostAndPort>
{
DownstreamHostAndPorts = new List<FileHostAndPort>
{
new() { Host = "a.b.cd" },
},
UpstreamPathTemplate = "/foo/bar/{everything}/{everything}",
Expand Down

0 comments on commit 6e768d0

Please sign in to comment.