Merge pull request #3 from ThreeMammals/master

Master merge
This commit is contained in:
jlukawska
2020-03-11 21:51:47 +01:00
committed by GitHub
103 changed files with 3101 additions and 1578 deletions

View File

@ -53,6 +53,7 @@
[Fact]
public void should_return_internal_server_error_if_downstream_service_returns_internal_server_error()
{
var port = RandomPortFinder.GetRandomPort();
var configuration = new FileConfiguration
{
@ -68,7 +69,7 @@
new FileHostAndPort
{
Host = "localhost",
Port = 53876,
Port = port,
}
},
DownstreamScheme = "http",
@ -76,7 +77,7 @@
}
};
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:53876"))
this.Given(x => x.GivenThereIsAServiceRunningOn($"http://localhost:{port}"))
.And(x => _steps.GivenThereIsAConfiguration(configuration))
.And(x => _steps.GivenOcelotIsRunning())
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/"))
@ -87,6 +88,8 @@
[Fact]
public void should_log_warning_if_downstream_service_returns_internal_server_error()
{
var port = RandomPortFinder.GetRandomPort();
var configuration = new FileConfiguration
{
ReRoutes = new List<FileReRoute>
@ -101,7 +104,7 @@
new FileHostAndPort
{
Host = "localhost",
Port = 53876,
Port = port,
},
},
DownstreamScheme = "http",
@ -109,7 +112,7 @@
},
};
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:53876"))
this.Given(x => x.GivenThereIsAServiceRunningOn($"http://localhost:{port}"))
.And(x => _steps.GivenThereIsAConfiguration(configuration))
.And(x => _steps.GivenOcelotIsRunningWithLogger())
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/"))