mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 15:28:16 +08:00
tidy up and no longer hard code admin area...still one int test failing before we start looking at rebuilding auth stuff
This commit is contained in:
@ -134,11 +134,8 @@ namespace Ocelot.AcceptanceTests
|
||||
.AddJsonFile("configuration.json")
|
||||
.AddEnvironmentVariables();
|
||||
|
||||
IServiceCollection serviceCollection = new ServiceCollection();
|
||||
var configuration = builder.Build();
|
||||
|
||||
_webHostBuilder = new WebHostBuilder();
|
||||
|
||||
_webHostBuilder.ConfigureServices(s =>
|
||||
{
|
||||
s.AddSingleton(_webHostBuilder);
|
||||
@ -158,7 +155,6 @@ namespace Ocelot.AcceptanceTests
|
||||
};
|
||||
|
||||
s.AddOcelot(configuration, settings);
|
||||
serviceCollection = s;
|
||||
})
|
||||
.ConfigureLogging(l =>
|
||||
{
|
||||
@ -167,7 +163,7 @@ namespace Ocelot.AcceptanceTests
|
||||
})
|
||||
.Configure(a =>
|
||||
{
|
||||
a.UseOcelot(ocelotMiddlewareConfig, serviceCollection).Wait();
|
||||
a.UseOcelot(ocelotMiddlewareConfig).Wait();
|
||||
}));
|
||||
|
||||
_ocelotClient = _ocelotServer.CreateClient();
|
||||
|
@ -59,7 +59,7 @@ namespace Ocelot.IntegrationTests
|
||||
public void should_return_response_200_with_call_re_routes_controller()
|
||||
{
|
||||
var configuration = new FileConfiguration
|
||||
{
|
||||
{
|
||||
GlobalConfiguration = new FileGlobalConfiguration
|
||||
{
|
||||
AdministrationPath = "/administration"
|
||||
|
@ -42,7 +42,7 @@
|
||||
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.DotNet.InternalAbstractions" Version="1.0.0" />
|
||||
<PackageReference Include="xunit" Version="2.3.0-beta2-build3683" />
|
||||
<PackageReference Include="IdentityServer4" Version="2.0.0-rc1-update1" />
|
||||
<PackageReference Include="IdentityServer4" Version="2.0.1" />
|
||||
<PackageReference Include="Shouldly" Version="2.8.3" />
|
||||
<PackageReference Include="TestStack.BDDfy" Version="4.3.2" />
|
||||
<PackageReference Include="Consul" Version="0.7.2.3" />
|
||||
|
@ -26,7 +26,6 @@ namespace Ocelot.ManualTest
|
||||
}
|
||||
|
||||
public IConfigurationRoot Configuration { get; }
|
||||
public IServiceCollection Services { get; private set; }
|
||||
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
@ -40,14 +39,13 @@ namespace Ocelot.ManualTest
|
||||
};
|
||||
|
||||
services.AddOcelot(Configuration, settings);
|
||||
Services = services;
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
|
||||
{
|
||||
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
|
||||
|
||||
app.UseOcelot(Services).Wait();
|
||||
app.UseOcelot().Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user