#534 fixed failing tests for this issue (#575)

This commit is contained in:
Tom Pallister
2018-08-25 12:32:56 +01:00
committed by GitHub
parent 00a600064d
commit b0bdeb9402
4 changed files with 676 additions and 596 deletions

View File

@ -21,6 +21,41 @@ namespace Ocelot.AcceptanceTests
_steps = new Steps();
}
[Fact]
public void should_not_match_forward_slash_in_pattern_before_next_forward_slash()
{
var port = 31879;
var configuration = new FileConfiguration
{
ReRoutes = new List<FileReRoute>
{
new FileReRoute
{
DownstreamPathTemplate = "/api/v{apiVersion}/cards",
DownstreamScheme = "http",
UpstreamPathTemplate = "/api/v{apiVersion}/cards",
UpstreamHttpMethod = new List<string> { "Get" },
DownstreamHostAndPorts = new List<FileHostAndPort>
{
new FileHostAndPort
{
Host = "localhost",
Port = port,
}
},
Priority = 1
}
}
};
this.Given(x => x.GivenThereIsAServiceRunningOn($"http://localhost:{port}/", "/api/v1/aaaaaaaaa/cards", 200, "Hello from Laura"))
.And(x => _steps.GivenThereIsAConfiguration(configuration))
.And(x => _steps.GivenOcelotIsRunning())
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/api/v1/aaaaaaaaa/cards"))
.Then(x => _steps.ThenTheStatusCodeShouldBe(HttpStatusCode.NotFound))
.BDDfy();
}
[Fact]
public void should_return_response_404_when_no_configuration_at_all()
{