You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<value>License expression must only contain licenses that are approved by Open Source Initiative or Free Software Foundation. Unsupported licenses: {0}.</value>
1075
1075
<comment>{0} is list of the package license ids that are neither OSI nor FSF approved</comment>
Copy file name to clipboardExpand all lines: tests/NuGetGallery.Facts/Services/PackageUploadServiceFacts.cs
+18-12Lines changed: 18 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -567,28 +567,33 @@ public async Task WarnsWhenInvalidLicenseUrlSpecifiedWithLicenseFile(string lice
567
567
Assert.Equal("To provide better experience for older clients when a license file is packaged, <licenseUrl> should be set to 'https://aka.ms/deprecateLicenseUrl'.",result.Warnings[0].PlainTextMessage);
568
568
}
569
569
570
-
[Fact]
571
-
publicasyncTaskAcceptsAlternativeLicenseUrl()
570
+
[Theory]
571
+
[InlineData("Apache-1.0+ OR MIT","Apache-1.0%2B+OR+MIT")]
572
+
[InlineData("Apache-1.0+ AND MIT","Apache-1.0%2B+AND+MIT")]
573
+
[InlineData("Apache-1.0+ AND MIT WITH Classpath-exception-2.0","Apache-1.0%2B+AND+MIT+WITH+Classpath-exception-2.0")]
574
+
[InlineData("MIT WITH Classpath-exception-2.0","MIT+WITH+Classpath-exception-2.0")]
Assert.Equal("To provide better experience for older clients when a license expression is specified, <licenseUrl> should be set to 'https://licenses.nuget.org/MIT'.",result.Warnings[0].PlainTextMessage);
Assert.StartsWith("To provide a better experience for older clients when a license expression is specified, <licenseUrl> must be set to 'https://licenses.nuget.org/MIT'.",result.Message.PlainTextMessage);
610
+
Assert.Empty(result.Warnings);
606
611
}
607
612
608
613
[Fact]
@@ -687,7 +692,8 @@ public async Task RejectsUnknownLicense(string licenseExpression)
687
692
[InlineData("Saxpath OR GPL-1.0-only WITH Classpath-exception-2.0",new[]{"Saxpath","GPL-1.0-only"})]
0 commit comments