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

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<apikeys>
</apikeys>
<packageSources>
<add key="dev" value="http://localhost:5000/index.json" protocolVersion="3" />
<!-- <add key="isn-prod" value="https://isn.pschneider.fr/index.json" protocolVersion="3" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> -->
</packageSources>
</configuration>

View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<apikeys>
</apikeys>
<packageSources>
<add key="isn-dev" value="http://localhost:5000/index.json" protocolVersion="3" />
</packageSources>
</configuration>

View file

@ -1,4 +0,0 @@
#!/bin/bash
nuget locals all -clear && dotnet nuget locals all --clear && nuget add Yavsc.Abstract -Config NuGet.Config -Source isn-dev

View file

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>test_isn</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

5
test/data/test-isn/test.sh Executable file
View file

@ -0,0 +1,5 @@
#!/bin/bash
nuget locals all -clear && dotnet nuget locals all --clear && \
nuget install -NoCache -Verbosity detailed -ConfigFile ANuGet.Config Yavsc.Abstract

View file

@ -1 +1 @@
nuget install -NoCache -Verbosity detailed -ConfigFile NuGet.Config Yavsc.Abstract
nuget install -NoCache -Verbosity detailed -ConfigFile ANuGet.Config Yavsc.Abstract

View file

@ -9,12 +9,12 @@
<Version>1.0.7</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
<PackageReference Include="xunit.runner.reporters" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageToolReference Include="xunit.runner.console" Version="2.4.1" PrivateAssets="All" />
<PackageReference Include="xunit.runner.reporters" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2" />
<PackageToolReference Include="xunit.runner.console" Version="2.4.2" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\isn\isn.csproj" />

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()
{

View file

@ -12,11 +12,11 @@
<ItemGroup>
<PackageReference Include="XunitXml.TestLogger" Version="3.0.70" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
<PackageReference Include="xunit.runner.reporters" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="xunit.runner.reporters" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\isnd\isnd.csproj" />