Feature/websockets (#273)

* #212 - hacked websockets proxy together

* faffing around

* #212 hacking away :(

* #212 websockets proxy middleware working

* #212 map when for webockets working

* #212 some test refactor

* #212 temp commit

* #212 websockets proxy working, tests passing...need to do some tidying and write docs

* #212 more code coverage

* #212 docs for websockets

* #212 updated readme

* #212 tidying up after websockets refactoring

* #212 tidying up after websockets refactoring

* #212 tidying up after websockets refactoring

* stuck a warning in about logging levels into docs!
This commit is contained in:
Tom Pallister
2018-03-23 18:01:02 +00:00
committed by GitHub
parent 4493b22d0d
commit 463a7bdab4
80 changed files with 1539 additions and 369 deletions

View File

@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using Consul;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
@ -28,7 +26,7 @@ namespace Ocelot.AcceptanceTests
}
[Fact]
public void should_use_service_discovery_and_load_balance_request()
public void should_load_balance_request()
{
var downstreamServiceOneUrl = "http://localhost:50881";
var downstreamServiceTwoUrl = "http://localhost:50892";
@ -74,18 +72,6 @@ namespace Ocelot.AcceptanceTests
.BDDfy();
}
private void ThenOnlyOneServiceHasBeenCalled()
{
_counterOne.ShouldBe(10);
_counterTwo.ShouldBe(0);
}
private void GivenIResetCounters()
{
_counterOne = 0;
_counterTwo = 0;
}
private void ThenBothServicesCalledRealisticAmountOfTimes(int bottom, int top)
{
_counterOne.ShouldBeInRange(bottom, top);
@ -121,7 +107,7 @@ namespace Ocelot.AcceptanceTests
context.Response.StatusCode = statusCode;
await context.Response.WriteAsync(response);
}
catch (System.Exception exception)
catch (Exception exception)
{
await context.Response.WriteAsync(exception.StackTrace);
}