mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-08-05 01:12:27 +08:00
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:
@ -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))
|
||||
|
Reference in New Issue
Block a user