Skip to content

Commit d1a773b

Browse files
morendedMounika Rendedla
andauthored
version string should be encoded in the purl string. (#428)
Co-authored-by: Mounika Rendedla <[email protected]>
1 parent 5fdcc86 commit d1a773b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/oss-tests/ProjectManagerTests/NuGetProjectManagerTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public async Task TestNugetCaseInsensitiveHandlingPackageExistsSucceeds(string p
110110
[TestMethod]
111111
public async Task TestNugetPackageWithVersionMetadataInPurlExists()
112112
{
113-
PackageURL purl = new("pkg:nuget/[email protected]+667fd085");
113+
PackageURL purl = new("pkg:nuget/[email protected]%2B667fd085");
114114
_projectManager = new NuGetProjectManager(".", null, _httpFactory);
115115

116116
bool exists = await _projectManager.PackageVersionExistsAsync(purl, useCache: false);
@@ -134,7 +134,7 @@ public async Task TestNugetPackageWithNormalizedVersionInPurlExists()
134134
[DataRow("pkg:nuget/razorengine", false, "RazorEngine - A Templating Engine based on the Razor parser.", "Matthew Abbott, Ben Dornis, Matthias Dittrich", "4.5.1-alpha001")] // Normal package, no specified version
135135
[DataRow("pkg:nuget/[email protected]", false, "Scripting layer C# Server for MTA San Andreas", "Slipe", null)] // Normal package, no specified version, pre-release versions only, returns null for latest version by default
136136
[DataRow("pkg:nuget/slipeserver.scripting", true, "Scripting layer C# Server for MTA San Andreas", "Slipe", "0.1.0-ci-20221120-180516")] // Normal package, no specified version, pre-release versions only, returns latest pre-release for latest version because of override
137-
[DataRow("pkg:nuget/[email protected]+667fd085",true,"The Pulumi .NET SDK lets you write cloud programs in C#, F#, and VB.NET.","Pulumi")]
137+
[DataRow("pkg:nuget/[email protected]%2B667fd085",true,"The Pulumi .NET SDK lets you write cloud programs in C#, F#, and VB.NET.","Pulumi")]
138138
[DataRow("pkg:nuget/[email protected]", true, "The Pulumi .NET SDK lets you write cloud programs in C#, F#, and VB.NET.","Pulumi")]
139139
public async Task MetadataSucceeds(string purlString, bool includePrerelease = false, string? description = null, string? authors = null, string? latestVersion = null)
140140
{
@@ -247,7 +247,7 @@ public async Task DetailedPackageExistsAsync_Succeeds(string purlString, bool ex
247247

248248
[DataTestMethod]
249249
[DataRow("pkg:nuget/[email protected]")]
250-
[DataRow("pkg:nuget/[email protected]+667fd085")]
250+
[DataRow("pkg:nuget/[email protected]%2B667fd085")]
251251
[DataRow("pkg:nuget/[email protected]")]
252252
public async Task DetailedPackageVersionExistsAsync_ExistsSucceeds(string purlString)
253253
{
@@ -271,7 +271,7 @@ public async Task DetailedPackageVersionExistsAsync_NotFoundSucceeds()
271271
[DataTestMethod]
272272
[DataRow("pkg:nuget/[email protected]", "2015-10-06T17:53:46.37+00:00")]
273273
[DataRow("pkg:nuget/[email protected]", "2017-09-02T05:17:55.973-04:00")]
274-
[DataRow("pkg:nuget/[email protected]+667fd085", "2022-04-05T16:56:44.043Z")]
274+
[DataRow("pkg:nuget/[email protected]%2B667fd085", "2022-04-05T16:56:44.043Z")]
275275
[DataRow("pkg:nuget/[email protected]", "2022-04-05T16:56:44.043Z")]
276276
public async Task GetPublishedAtSucceeds(string purlString, string? expectedTime = null)
277277
{
@@ -319,7 +319,7 @@ public async Task GetPackagePrefixReservedSucceeds(string purlString, bool expec
319319
[DataRow("pkg:nuget/[email protected]",
320320
"https://api.nuget.org/v3-flatcontainer/slipeserver.scripting/0.1.0-ci-20220607-083949/slipeserver.scripting.0.1.0-ci-20220607-083949.nupkg",
321321
"https://api.nuget.org/v3-flatcontainer/slipeserver.scripting/0.1.0-ci-20220607-083949/slipeserver.scripting.nuspec")]
322-
[DataRow("pkg:nuget/[email protected]+667fd085",
322+
[DataRow("pkg:nuget/[email protected]%2B667fd085",
323323
"https://api.nuget.org/v3-flatcontainer/pulumi/3.29.0-alpha.1649173720/pulumi.3.29.0-alpha.1649173720.nupkg",
324324
"https://api.nuget.org/v3-flatcontainer/pulumi/3.29.0-alpha.1649173720/pulumi.nuspec")]
325325
[DataRow("pkg:nuget/[email protected]",

0 commit comments

Comments
 (0)