started implementing the consul service provider

This commit is contained in:
TomPallister
2017-02-04 13:16:31 +00:00
parent 7900aa3f49
commit c46dcc05b8
41 changed files with 282 additions and 140 deletions

View File

@ -151,7 +151,7 @@ namespace Ocelot.UnitTests.Configuration
ServiceDiscoveryProvider = new FileServiceDiscoveryProvider
{
Provider = "consul",
Address = "127.0.0.1"
Host = "127.0.0.1"
}
}
}))
@ -579,7 +579,7 @@ namespace Ocelot.UnitTests.Configuration
private void WhenICreateTheConfig()
{
_config = _ocelotConfigurationCreator.Create();
_config = _ocelotConfigurationCreator.Create().Result;
}
private void ThenTheReRoutesAre(List<ReRoute> expectedReRoutes)
@ -617,7 +617,7 @@ namespace Ocelot.UnitTests.Configuration
{
_loadBalancerFactory
.Setup(x => x.Get(It.IsAny<ReRoute>()))
.Returns(_loadBalancer.Object);
.ReturnsAsync(_loadBalancer.Object);
}
private void TheLoadBalancerFactoryIsCalledCorrectly()

View File

@ -81,7 +81,7 @@ namespace Ocelot.UnitTests.Configuration
{
_creator
.Setup(x => x.Create())
.Returns(config);
.ReturnsAsync(config);
}
private void GivenTheRepoReturns(Response<IOcelotConfiguration> config)
@ -93,7 +93,7 @@ namespace Ocelot.UnitTests.Configuration
private void WhenIGetTheConfig()
{
_result = _ocelotConfigurationProvider.Get();
_result = _ocelotConfigurationProvider.Get().Result;
}
private void TheFollowingIsReturned(Response<IOcelotConfiguration> expected)