Raft round 2 (#182)

* brought in rafty

* moved raft classes into Ocelot and deleted from int project

* started to set up rafty in Ocelot

* RAFTY INSIDE OCELOT...WOOT

* more work adding rafty...just need to get auth working now

* rudimentary authenticated raft requests working

* asyn await stuff

* hacked rafty into the fileconfigurationcontroller...everything seems to be working roughly but I have a lot of refactoring to do

* updated to latest rafty that doesnt need an id

* hacky but all tests passing

* changed admin area set up to use builder not configuration.json, changed admin area auth to use client credentials

* missing code coverage

* ignore raft sectionf for code coverage

* ignore raft sectionf for code coverage

* back to normal filters

* try exclude attr

* missed these

* moved client secret to builder for authentication and updated docs

* lock to try and fix error accessing identity server created temprsa file on build server

* updated postman scripts and changed Ocelot to not always use type handling as this looked crap when manually accessing the configuration endpoint

* added rafty docs

* changes I missed

* added serialisation code we need for rafty to process commands when they proxy to leader

* moved controllers into their feature slices
This commit is contained in:
Tom Pallister
2018-01-01 18:40:39 +00:00
committed by GitHub
parent 194f76cf7f
commit f082f7318a
50 changed files with 1876 additions and 459 deletions

View File

@ -15,6 +15,7 @@ using Xunit;
namespace Ocelot.UnitTests.Configuration
{
using Ocelot.DependencyInjection;
using Ocelot.Errors;
using Ocelot.UnitTests.TestData;
@ -36,6 +37,7 @@ namespace Ocelot.UnitTests.Configuration
private Mock<IRateLimitOptionsCreator> _rateLimitOptions;
private Mock<IRegionCreator> _regionCreator;
private Mock<IHttpHandlerOptionsCreator> _httpHandlerOptionsCreator;
private Mock<IAdministrationPath> _adminPath;
public FileConfigurationCreatorTests()
{
@ -52,13 +54,23 @@ namespace Ocelot.UnitTests.Configuration
_rateLimitOptions = new Mock<IRateLimitOptionsCreator>();
_regionCreator = new Mock<IRegionCreator>();
_httpHandlerOptionsCreator = new Mock<IHttpHandlerOptionsCreator>();
_adminPath = new Mock<IAdministrationPath>();
_ocelotConfigurationCreator = new FileOcelotConfigurationCreator(
_fileConfig.Object, _validator.Object, _logger.Object,
_fileConfig.Object,
_validator.Object,
_logger.Object,
_claimsToThingCreator.Object,
_authOptionsCreator.Object, _upstreamTemplatePatternCreator.Object, _requestIdKeyCreator.Object,
_serviceProviderConfigCreator.Object, _qosOptionsCreator.Object, _fileReRouteOptionsCreator.Object,
_rateLimitOptions.Object, _regionCreator.Object, _httpHandlerOptionsCreator.Object);
_authOptionsCreator.Object,
_upstreamTemplatePatternCreator.Object,
_requestIdKeyCreator.Object,
_serviceProviderConfigCreator.Object,
_qosOptionsCreator.Object,
_fileReRouteOptionsCreator.Object,
_rateLimitOptions.Object,
_regionCreator.Object,
_httpHandlerOptionsCreator.Object,
_adminPath.Object);
}
[Fact]