This commit is contained in:
Paul Schneider 2023-03-14 00:15:42 +00:00
commit 6f79be26d8
33 changed files with 554 additions and 369 deletions

View file

@ -1,3 +1,4 @@
using System.Threading;
using System;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore;
@ -88,6 +89,21 @@ namespace isnd.host.tests
new Uri(isnSettings.ExternalUrl + "/v3.4.0//registration"));
}
}
[Fact]
public void TrueTestRegistrationV3Resource()
{
using (var serviceScope = server.Host.Services.CreateScope())
{
var isnSettings = serviceScope.ServiceProvider.GetService<IOptions<isnd.Entities.IsndSettings>>().Value;
string pkgSourceUrl = isnSettings.ExternalUrl + "/index.json";
var prov = new RegistrationResourceV3Provider();
var source = new PackageSource(pkgSourceUrl);
var repo = new SourceRepository(source, new INuGetResourceProvider[]{ prov });
prov.TryCreate(repo, CancellationToken.None);
}
}
private Task<HttpHandlerResource> PkgSourceMessageHandler()
{