mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 10:38:15 +08:00
another script change to find error
This commit is contained in:
@ -61,6 +61,47 @@ namespace Ocelot.AcceptanceTests
|
||||
.BDDfy();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void bug()
|
||||
{
|
||||
var configuration = new FileConfiguration
|
||||
{
|
||||
ReRoutes = new List<FileReRoute>
|
||||
{
|
||||
new FileReRoute
|
||||
{
|
||||
DownstreamPathTemplate = "/api/v1/vacancy",
|
||||
DownstreamScheme = "http",
|
||||
DownstreamHost = "localhost",
|
||||
DownstreamPort = 51879,
|
||||
UpstreamPathTemplate = "/vacancy/",
|
||||
UpstreamHttpMethod = new List<string> { "Options", "Put", "Get", "Post", "Delete" },
|
||||
ServiceName = "botCore",
|
||||
LoadBalancer = "LeastConnection"
|
||||
},
|
||||
new FileReRoute
|
||||
{
|
||||
DownstreamPathTemplate = "/api/v1/vacancy/{vacancyId}",
|
||||
DownstreamScheme = "http",
|
||||
DownstreamHost = "localhost",
|
||||
DownstreamPort = 51879,
|
||||
UpstreamPathTemplate = "/vacancy/{vacancyId}",
|
||||
UpstreamHttpMethod = new List<string> { "Options", "Put", "Get", "Post", "Delete" },
|
||||
ServiceName = "botCore",
|
||||
LoadBalancer = "LeastConnection"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this.Given(x => x.GivenThereIsAServiceRunningOn("http://localhost:51879/api/v1/vacancy/1", 200, "Hello from Laura"))
|
||||
.And(x => _steps.GivenThereIsAConfiguration(configuration))
|
||||
.And(x => _steps.GivenOcelotIsRunning())
|
||||
.When(x => _steps.WhenIGetUrlOnTheApiGateway("/vacancy/1"))
|
||||
.Then(x => _steps.ThenTheStatusCodeShouldBe(HttpStatusCode.OK))
|
||||
.And(x => _steps.ThenTheResponseBodyShouldBe("Hello from Laura"))
|
||||
.BDDfy();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void should_return_response_200_when_path_missing_forward_slash_as_first_char()
|
||||
{
|
||||
|
Reference in New Issue
Block a user