GetMetaData OK

This commit is contained in:
2024-10-09 23:19:38 +01:00
parent 7ca465d4a9
commit 2b45e421dd
14 changed files with 43 additions and 64 deletions

View File

@ -12,7 +12,4 @@
</PropertyGroup>
<ItemGroup>
</ItemGroup>
<ItemGroup>
<PackageReference Include="isn.abst" Version="*" />
</ItemGroup>
</Project>

View File

@ -30,7 +30,7 @@ namespace isn.tests
public void TestPush()
{
Program.LoadConfig();
var report = Program.PushPkg(new string[] { "./src/isn.abst/bin/Debug/isn.abst.1.0.1.nupkg" });
var report = Program.PushPkg(new string[] { "./src/isn.abst/bin/Release/isn.abst.1.0.24.nupkg" });
}
[Fact]
@ -50,9 +50,8 @@ namespace isn.tests
var setting = Settings.Create();
setting.Sources[source] = new SourceSettings{ Url=source };
string testingKey = "CfDJ8LF3SbIJ4FJAgs7uIQKhdCAYCNVXRwU6TEoaXOo1_ZpG2u8TCGFP2z13hw9xR0LC0gdbr1QGwNndiXUl4DI74nxyBi-T1oC33PWtE-5vgiJWeCH223PYtoSEdzDiWovwJZWJbQON0WqoG8vSfbrBXTmicD6oxF4ghwXXexY0RiRR";
var rsa = RSA.Create(setting.RSAParameters);
setting.Sources[source].SetApiKey(rsa,testingKey);
Assert.Equal(testingKey, setting.Sources[source].GetClearApiKey(rsa));
Assert.Equal(testingKey, setting.Sources[source].ApiKey);
}
}

View File

@ -67,7 +67,7 @@ namespace isnd.host.tests
string pkgSourceUrl = isnSettings.ExternalUrl + apiindex + ".json";
ProcessStartInfo psi = new ProcessStartInfo("nuget");
psi.ArgumentList.Add("install");
psi.ArgumentList.Add("isnd");
psi.ArgumentList.Add("isn.abst");
psi.ArgumentList.Add("-PreRelease");
psi.ArgumentList.Add("-Source");
psi.ArgumentList.Add(pkgSourceUrl);
@ -128,7 +128,7 @@ namespace isnd.host.tests
PackageMetadataResource resource = await repository.GetResourceAsync<PackageMetadataResource>();
IEnumerable<IPackageSearchMetadata> packages = await resource.GetMetadataAsync(
"isnd",
"isn.abst",
includePrerelease: true,
includeUnlisted: true,
cache,
@ -178,7 +178,7 @@ namespace isnd.host.tests
PackageUpdateResource pushRes = await repository.GetResourceAsync<PackageUpdateResource>();
SymbolPackageUpdateResourceV3 symbolPackageResource = await repository.GetResourceAsync<SymbolPackageUpdateResourceV3>();
await pushRes.Push(new List<string>{ "../../../../../src/isn.abst/bin/Release/isn.abst.1.0.1.nupkg" }, null,
await pushRes.Push(new List<string>{ "../../../../../src/isn.abst/bin/Release/isn.abst.1.0.24.nupkg" }, null,
5000, false, GetApiKey, GetSymbolsApiKey, false, false, symbolPackageResource, logger);
}

View File

@ -101,6 +101,7 @@ namespace isnd.tests
Name = "Testing Key",
UserId = TestingUser.Id,
ValidityPeriodInDays = 1
};
testKey = keyProvider.CreateApiKeyAsync(apiKeyQuery).Result;