added docs but qos acceptance test not working seems circuit never opens but not sure if it is meant to with timeouts..investigating

This commit is contained in:
TomPallister
2017-02-11 15:11:10 +00:00
parent ce8da4c92d
commit 820673dda8
10 changed files with 235 additions and 31 deletions

View File

@ -1,6 +1,8 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using Ocelot.Errors;
using Ocelot.Middleware;
using Ocelot.Requester;
using Ocelot.Responder;
using Ocelot.Responses;
using Shouldly;
@ -20,6 +22,18 @@ namespace Ocelot.UnitTests.Responder
_codeMapper = new ErrorsToHttpStatusCodeMapper();
}
[Fact]
public void should_return_timeout()
{
this.Given(x => x.GivenThereAreErrors(new List<Error>
{
new RequestTimedOutError(new Exception())
}))
.When(x => x.WhenIGetErrorStatusCode())
.Then(x => x.ThenTheResponseIsStatusCodeIs(408))
.BDDfy();
}
[Fact]
public void should_create_unauthenticated_response_code()
{