Feature/automatic routes with sd (#351)

* #340 started looking at supporting automatic routing when using service discovery

* #340 getting old routing tests to pass

* #340 renamed stuff to provider rather than finder, as its not longer finding anything

* #340 working towards supporting dynamic routing

* #340 loads of refactoring to make configuration work with dynamic routing

* #340 refactor consul config code so the registry class owns it

* #340 default to consul to maintain backwards compat

* #340 added docs, finished this branches todos
This commit is contained in:
Tom Pallister
2018-05-14 21:26:10 +01:00
committed by GitHub
parent dadb43ef6f
commit 1e2e953b2c
64 changed files with 2082 additions and 1221 deletions

View File

@ -47,10 +47,13 @@ namespace Ocelot.UnitTests.Requester
[Fact]
public void should_call_request_correctly()
{
var qosOptions = new QoSOptionsBuilder()
.Build();
var reRoute = new DownstreamReRouteBuilder()
.WithIsQos(false)
.WithQosOptions(qosOptions)
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false))
.WithReRouteKey("")
.WithLoadBalancerKey("")
.WithQosOptions(new QoSOptionsBuilder().Build())
.Build();
@ -70,10 +73,13 @@ namespace Ocelot.UnitTests.Requester
[Fact]
public void should_call_request_unable_to_complete_request()
{
var qosOptions = new QoSOptionsBuilder()
.Build();
var reRoute = new DownstreamReRouteBuilder()
.WithIsQos(false)
.WithQosOptions(qosOptions)
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false))
.WithReRouteKey("")
.WithLoadBalancerKey("")
.WithQosOptions(new QoSOptionsBuilder().Build())
.Build();
@ -92,10 +98,13 @@ namespace Ocelot.UnitTests.Requester
[Fact]
public void http_client_request_times_out()
{
var qosOptions = new QoSOptionsBuilder()
.Build();
var reRoute = new DownstreamReRouteBuilder()
.WithIsQos(false)
.WithQosOptions(qosOptions)
.WithHttpHandlerOptions(new HttpHandlerOptions(false, false, false))
.WithReRouteKey("")
.WithLoadBalancerKey("")
.WithQosOptions(new QoSOptionsBuilder().WithTimeoutValue(1).Build())
.Build();