fixed more failing acceptance tests...think the only thing to do now is work out the authentication stuff and that should fix all the other tests

This commit is contained in:
Tom Pallister
2017-10-30 13:14:12 +00:00
parent b23bbf56b9
commit 120532bb0d
4 changed files with 35 additions and 31 deletions

View File

@ -75,7 +75,7 @@ namespace Ocelot.AcceptanceTests
}
};
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879/api/ClientRateLimit"))
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", "/api/ClientRateLimit"))
.And(x => _steps.GivenThereIsAConfiguration(configuration))
.And(x => _steps.GivenOcelotIsRunning())
.When(x => _steps.WhenIGetUrlOnTheApiGatewayMultipleTimesForRateLimit("/api/ClientRateLimit",1))
@ -128,7 +128,7 @@ namespace Ocelot.AcceptanceTests
}
};
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879/api/ClientRateLimit"))
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879", "/api/ClientRateLimit"))
.And(x => _steps.GivenThereIsAConfiguration(configuration))
.And(x => _steps.GivenOcelotIsRunning())
.When(x => _steps.WhenIGetUrlOnTheApiGatewayMultipleTimesForRateLimit("/api/ClientRateLimit", 4))
@ -137,16 +137,17 @@ namespace Ocelot.AcceptanceTests
}
private void GivenThereIsAServiceRunningOn(string url)
private void GivenThereIsAServiceRunningOn(string baseUrl, string basePath)
{
_builder = new WebHostBuilder()
.UseUrls(url)
.UseUrls(baseUrl)
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseUrls(url)
.UseUrls(baseUrl)
.Configure(app =>
{
app.UsePathBase(basePath);
app.Run(context =>
{
_counterOne++;