version bumps
This commit is contained in:
@ -43,6 +43,7 @@ namespace isn.tests
|
||||
Assert.NotNull(vm);
|
||||
Assert.NotNull(vm.Resources);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestPush()
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ using NuGet.Common;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace isnd.host.tests
|
||||
{
|
||||
{
|
||||
[Collection("Web server collection")]
|
||||
public class UnitTestWebHost : IClassFixture<WebServerFixture>
|
||||
{
|
||||
@ -42,14 +42,14 @@ namespace isnd.host.tests
|
||||
[Fact]
|
||||
void TestDropUser()
|
||||
{
|
||||
|
||||
|
||||
using (var serviceScope = server.Host.Services.CreateScope())
|
||||
{
|
||||
var services = serviceScope.ServiceProvider;
|
||||
var dbContext = services.GetRequiredService<ApplicationDbContext>();
|
||||
var paul = dbContext.Users.FirstOrDefaultAsync
|
||||
(u => u.Email == "paul@pschneider.fr").Result;
|
||||
if (paul!=null)
|
||||
if (paul != null)
|
||||
{
|
||||
dbContext.Users.Remove(paul);
|
||||
dbContext.SaveChanges();
|
||||
@ -62,17 +62,18 @@ namespace isnd.host.tests
|
||||
public void NugetInstallsTest()
|
||||
{
|
||||
using (var serviceScope = server.Host.Services.CreateScope())
|
||||
{ var isnSettings = serviceScope.ServiceProvider.GetService<IOptions<isnd.Entities.IsndSettings>>().Value;
|
||||
string pkgSourceUrl = isnSettings.ExternalUrl + apiindex;
|
||||
ProcessStartInfo psi = new ProcessStartInfo("nuget");
|
||||
psi.ArgumentList.Add("install");
|
||||
psi.ArgumentList.Add("gitversion");
|
||||
psi.ArgumentList.Add("-PreRelease");
|
||||
psi.ArgumentList.Add("-Source");
|
||||
psi.ArgumentList.Add(pkgSourceUrl);
|
||||
Process p = Process.Start(psi);
|
||||
p.WaitForExit();
|
||||
Assert.True(p.ExitCode == 0, "nuget install failed!");
|
||||
{
|
||||
var isnSettings = serviceScope.ServiceProvider.GetService<IOptions<isnd.Entities.IsndSettings>>().Value;
|
||||
string pkgSourceUrl = isnSettings.ExternalUrl + apiindex;
|
||||
ProcessStartInfo psi = new ProcessStartInfo("nuget");
|
||||
psi.ArgumentList.Add("install");
|
||||
psi.ArgumentList.Add("gitversion");
|
||||
psi.ArgumentList.Add("-PreRelease");
|
||||
psi.ArgumentList.Add("-Source");
|
||||
psi.ArgumentList.Add(pkgSourceUrl);
|
||||
Process p = Process.Start(psi);
|
||||
p.WaitForExit();
|
||||
Assert.True(p.ExitCode == 0, "nuget install failed!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,29 +81,30 @@ namespace isnd.host.tests
|
||||
public void TestRegistrationV3Resource()
|
||||
{
|
||||
using (var serviceScope = server.Host.Services.CreateScope())
|
||||
{ var isnSettings = serviceScope.ServiceProvider.GetService<IOptions<isnd.Entities.IsndSettings>>().Value;
|
||||
string pkgSourceUrl = isnSettings.ExternalUrl + apiindex;
|
||||
NullThrottle throttle = new NullThrottle();
|
||||
{
|
||||
var isnSettings = serviceScope.ServiceProvider.GetService<IOptions<isnd.Entities.IsndSettings>>().Value;
|
||||
string pkgSourceUrl = isnSettings.ExternalUrl + apiindex;
|
||||
NullThrottle throttle = new NullThrottle();
|
||||
|
||||
PackageSource packageSource = new PackageSource(pkgSourceUrl);
|
||||
HttpSource client = new HttpSource(packageSource, PkgSourceMessageHandler, throttle);
|
||||
NuGet.Protocol.RegistrationResourceV3 res = new NuGet.Protocol.RegistrationResourceV3(client ,
|
||||
new Uri(isnSettings.ExternalUrl + Constants.ApiVersionPrefix + "/registration"));
|
||||
PackageSource packageSource = new PackageSource(pkgSourceUrl);
|
||||
HttpSource client = new HttpSource(packageSource, PkgSourceMessageHandler, throttle);
|
||||
NuGet.Protocol.RegistrationResourceV3 res = new NuGet.Protocol.RegistrationResourceV3(client,
|
||||
new Uri(isnSettings.ExternalUrl + Constants.ApiVersionPrefix + "/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 + apiindex;
|
||||
var prov = new RegistrationResourceV3Provider();
|
||||
var source = new PackageSource(pkgSourceUrl);
|
||||
var repo = new SourceRepository(source, new INuGetResourceProvider[]{ prov });
|
||||
prov.TryCreate(repo, CancellationToken.None);
|
||||
|
||||
string pkgSourceUrl = isnSettings.ExternalUrl + apiindex;
|
||||
var prov = new RegistrationResourceV3Provider();
|
||||
var source = new PackageSource(pkgSourceUrl);
|
||||
var repo = new SourceRepository(source, new INuGetResourceProvider[] { prov });
|
||||
prov.TryCreate(repo, CancellationToken.None);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -110,10 +112,11 @@ namespace isnd.host.tests
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public string SPIIndexURI {
|
||||
public string SPIIndexURI
|
||||
{
|
||||
get => server.Addresses.First() + "/v3/index";
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public async Task TestGetMetadataAsync()
|
||||
{
|
||||
@ -142,7 +145,7 @@ namespace isnd.host.tests
|
||||
Console.WriteLine($"Description: {package.Description}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public async Task TestFindPackageAsync()
|
||||
{
|
||||
|
@ -10,12 +10,12 @@
|
||||
<Version>1.0.7</Version>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
|
||||
<PackageReference Include="XunitXml.TestLogger" Version="3.0.70" />
|
||||
<PackageReference Include="xunit" Version="2.4.2" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
|
||||
<PackageReference Include="XunitXml.TestLogger" Version="3.1.20" />
|
||||
<PackageReference Include="xunit" Version="2.6.6" />
|
||||
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
|
||||
<PackageReference Include="xunit.runner.reporters" Version="2.4.2" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2" />
|
||||
<PackageReference Include="xunit.runner.reporters" Version="2.6.6" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6" />
|
||||
<PackageToolReference Include="xunit.runner.console" Version="2.4.2" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
Reference in New Issue
Block a user