Feature/#295 consul acl (#307)

* removed file

* updated package

* updated package

* updated package

* updated package

* updated package

* updated package

* updated package

* all packages updated

* #295 can add token to service provider config and this will be used by consul clients to get services and configuration

* #295 wait longer for this test
This commit is contained in:
Tom Pallister
2018-04-08 15:54:58 +01:00
committed by GitHub
parent d7ef956935
commit 982eebfc74
28 changed files with 345 additions and 908 deletions

View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using Moq;
using Ocelot.Configuration;
using Ocelot.Configuration.Builder;
using Ocelot.Infrastructure.Consul;
using Ocelot.Logging;
using Ocelot.ServiceDiscovery;
using Ocelot.ServiceDiscovery.Providers;
@ -19,11 +20,13 @@ namespace Ocelot.UnitTests.ServiceDiscovery
private readonly ServiceDiscoveryProviderFactory _factory;
private DownstreamReRoute _reRoute;
private Mock<IOcelotLoggerFactory> _loggerFactory;
private IConsulClientFactory _clientFactory;
public ServiceProviderFactoryTests()
{
_loggerFactory = new Mock<IOcelotLoggerFactory>();
_factory = new ServiceDiscoveryProviderFactory(_loggerFactory.Object);
_clientFactory = new ConsulClientFactory();
_factory = new ServiceDiscoveryProviderFactory(_loggerFactory.Object, _clientFactory);
}
[Fact]
@ -87,7 +90,7 @@ namespace Ocelot.UnitTests.ServiceDiscovery
.Build();
var serviceConfig = new ServiceProviderConfigurationBuilder()
.WithServiceDiscoveryProviderType("ServiceFabric")
.WithType("ServiceFabric")
.Build();
this.Given(x => x.GivenTheReRoute(serviceConfig, reRoute))