mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-18 23:28:14 +08:00
Upgrade Pivotal.Discovery.Client to Pivotal.Discovery.ClientCore (#369)
This commit is contained in:

committed by
Tom Pallister

parent
d01720c349
commit
32a258fd3f
@ -7,6 +7,8 @@ namespace Ocelot.UnitTests.Middleware
|
||||
using Ocelot.Middleware.Pipeline;
|
||||
using Pivotal.Discovery.Client;
|
||||
using Shouldly;
|
||||
using Steeltoe.Common.Discovery;
|
||||
using Steeltoe.Discovery.Eureka;
|
||||
using TestStack.BDDfy;
|
||||
using Xunit;
|
||||
|
||||
@ -40,7 +42,16 @@ namespace Ocelot.UnitTests.Middleware
|
||||
var root = test.Build();
|
||||
var services = new ServiceCollection();
|
||||
services.AddSingleton<IConfiguration>(root);
|
||||
services.AddDiscoveryClient(new DiscoveryOptions {ClientType = DiscoveryClientType.EUREKA});
|
||||
services.AddDiscoveryClient(new DiscoveryOptions
|
||||
{
|
||||
ClientType = DiscoveryClientType.EUREKA,
|
||||
//options can not be null
|
||||
ClientOptions = new EurekaClientOptions()
|
||||
{
|
||||
ShouldFetchRegistry = false,
|
||||
ShouldRegisterWithEureka = false
|
||||
}
|
||||
});
|
||||
services.AddOcelot();
|
||||
var provider = services.BuildServiceProvider();
|
||||
_builder = new OcelotPipelineBuilder(provider);
|
||||
|
Reference in New Issue
Block a user