mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 15:28:16 +08:00
unit tests pass...
This commit is contained in:
@ -275,7 +275,7 @@ namespace Ocelot.AcceptanceTests
|
||||
{
|
||||
services.AddLogging();
|
||||
services.AddIdentityServer()
|
||||
.AddTemporarySigningCredential()
|
||||
.AddDeveloperSigningCredential()
|
||||
.AddInMemoryApiResources(new List<ApiResource>
|
||||
{
|
||||
new ApiResource
|
||||
|
@ -259,7 +259,7 @@ namespace Ocelot.AcceptanceTests
|
||||
{
|
||||
services.AddLogging();
|
||||
services.AddIdentityServer()
|
||||
.AddTemporarySigningCredential()
|
||||
.AddDeveloperSigningCredential()
|
||||
.AddInMemoryApiResources(new List<ApiResource>
|
||||
{
|
||||
new ApiResource
|
||||
|
@ -133,7 +133,7 @@ namespace Ocelot.AcceptanceTests
|
||||
{
|
||||
services.AddLogging();
|
||||
services.AddIdentityServer()
|
||||
.AddTemporarySigningCredential()
|
||||
.AddDeveloperSigningCredential()
|
||||
.AddInMemoryApiResources(new List<ApiResource>
|
||||
{
|
||||
new ApiResource
|
||||
|
@ -140,7 +140,7 @@ namespace Ocelot.AcceptanceTests
|
||||
{
|
||||
services.AddLogging();
|
||||
services.AddIdentityServer()
|
||||
.AddTemporarySigningCredential()
|
||||
.AddDeveloperSigningCredential()
|
||||
.AddInMemoryApiResources(new List<ApiResource>
|
||||
{
|
||||
new ApiResource
|
||||
|
@ -31,6 +31,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0-beta2-build1317" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="2.0.0" />
|
||||
|
@ -134,6 +134,7 @@ namespace Ocelot.AcceptanceTests
|
||||
.AddJsonFile("configuration.json")
|
||||
.AddEnvironmentVariables();
|
||||
|
||||
IServiceCollection serviceCollection = new ServiceCollection();
|
||||
var configuration = builder.Build();
|
||||
|
||||
_webHostBuilder = new WebHostBuilder();
|
||||
@ -157,15 +158,16 @@ namespace Ocelot.AcceptanceTests
|
||||
};
|
||||
|
||||
s.AddOcelot(configuration, settings);
|
||||
serviceCollection = s;
|
||||
})
|
||||
.ConfigureLogging(l =>
|
||||
{
|
||||
l.AddConsole(configuration.GetSection("Logging"));
|
||||
l.AddConsole();
|
||||
l.AddDebug();
|
||||
})
|
||||
.Configure(a =>
|
||||
{
|
||||
a.UseOcelot(ocelotMiddlewareConfig).Wait();
|
||||
a.UseOcelot(ocelotMiddlewareConfig, serviceCollection).Wait();
|
||||
}));
|
||||
|
||||
_ocelotClient = _ocelotServer.CreateClient();
|
||||
|
Reference in New Issue
Block a user