fixes the catalog page
This commit is contained in:
@ -114,7 +114,7 @@ namespace isnd.host.tests
|
||||
}
|
||||
public string SPIIndexURI
|
||||
{
|
||||
get => server.Addresses.First(a => a.StartsWith("https:")) + "/v3/index.json";
|
||||
get => server.Addresses.First(a => a.StartsWith("http:")) + "/v3/index.json";
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -5,6 +5,7 @@ using isn;
|
||||
using isnd.Data;
|
||||
using isnd.Entities;
|
||||
using isnd.Interfaces;
|
||||
using Microsoft.AspNetCore;
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Hosting.Server;
|
||||
@ -46,32 +47,27 @@ namespace isnd.tests
|
||||
|
||||
public void SetupHost()
|
||||
{
|
||||
var webhostBuilder = new WebHostBuilder()
|
||||
.UseKestrel()
|
||||
.UseIISIntegration()
|
||||
var builder = WebHost.CreateDefaultBuilder(new string[0]);
|
||||
|
||||
// .UseContentRoot("../../../../../src/isnd")
|
||||
.UseStartup(typeof(Startup))
|
||||
builder.UseStartup(typeof(Startup))
|
||||
.ConfigureAppConfiguration((builderContext, config) =>
|
||||
{
|
||||
config.AddJsonFile("appsettings.json", false);
|
||||
config.AddJsonFile("appsettings.json", true);
|
||||
config.AddJsonFile("appsettings.Development.json", false);
|
||||
});
|
||||
|
||||
|
||||
|
||||
Host = webhostBuilder.Build();
|
||||
Host = builder.Build();
|
||||
|
||||
var logFactory = Host.Services.GetRequiredService<ILoggerFactory>();
|
||||
Logger = logFactory.CreateLogger<WebServerFixture>();
|
||||
|
||||
|
||||
Host.Start(); //Starts listening on the configured addresses.
|
||||
var server = Host.Services.GetRequiredService<IServer>();
|
||||
|
||||
|
||||
var addressFeature = server.Features.Get<IServerAddressesFeature>();
|
||||
var addressFeatures = server.Features.Get<IServerAddressesFeature>();
|
||||
|
||||
foreach (var address in addressFeature.Addresses)
|
||||
foreach (var address in addressFeatures.Addresses)
|
||||
{
|
||||
Addresses.Add(address);
|
||||
}
|
||||
|
Reference in New Issue
Block a user