This repository has been archived by the owner on Mar 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #255 from NuGet/dev
[ReleasePrep][2017.10.30]RI of dev into master
- Loading branch information
Showing
17 changed files
with
427 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...es.Metadata.Catalog.Monitoring/Validation/Test/Exceptions/TimestampComparisonException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System; | ||
using Newtonsoft.Json; | ||
|
||
namespace NuGet.Services.Metadata.Catalog.Monitoring | ||
{ | ||
public class TimestampComparisonException : ValidationException | ||
{ | ||
public PackageTimestampMetadata TimestampV2 { get; } | ||
public PackageTimestampMetadata TimestampCatalog { get; } | ||
|
||
public TimestampComparisonException(PackageTimestampMetadata timestampV2, PackageTimestampMetadata timestampCatalog, string message) | ||
: base(message) | ||
{ | ||
TimestampV2 = timestampV2; | ||
TimestampCatalog = timestampCatalog; | ||
|
||
Data.Add(nameof(TimestampV2), JsonConvert.SerializeObject(TimestampV2)); | ||
Data.Add(nameof(TimestampCatalog), JsonConvert.SerializeObject(TimestampCatalog)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 84 additions & 0 deletions
84
tests/CatalogTests/TestData/EmptyDependencyVersionRange.0.1.0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"@id": "http://example/data/2017.01.04.08.15.00/emptydependencyversionrange.0.1.0.json", | ||
"@type": [ | ||
"PackageDetails", | ||
"catalog:Permalink" | ||
], | ||
"authors": "EmptyDependencyVersionRange", | ||
"catalog:commitId": "4aee0ef4-a039-4460-bd5f-98f944e33289", | ||
"catalog:commitTimeStamp": "2017-01-04T08:15:00Z", | ||
"created": "2017-01-01T08:15:00Z", | ||
"description": "EmptyDependencyVersionRange", | ||
"id": "EmptyDependencyVersionRange", | ||
"isPrerelease": false, | ||
"lastEdited": "2017-01-02T08:15:00Z", | ||
"listed": true, | ||
"packageHash": "J1NrM0aeDXk3kdjY3Aby8duP+mAt1JN/srVW5AMDIFXJXhWjZgmwAnAKBBrO6VDWXg2hi1x+uaWLHI0dUXraUg==", | ||
"packageHashAlgorithm": "SHA512", | ||
"packageSize": 450, | ||
"published": "2017-01-03T08:15:00Z", | ||
"title": "EmptyDependencyVersionRange", | ||
"verbatimVersion": "0.1.0", | ||
"version": "0.1.0", | ||
"dependencyGroups": [ | ||
{ | ||
"@id": "http://example/data/2017.01.04.08.15.00/emptydependencyversionrange.0.1.0.json#dependencygroup", | ||
"@type": "PackageDependencyGroup", | ||
"dependencies": [ | ||
{ | ||
"@id": "http://example/data/2017.01.04.08.15.00/emptydependencyversionrange.0.1.0.json#dependencygroup/nuget.versioning", | ||
"@type": "PackageDependency", | ||
"id": "NuGet.Versioning", | ||
"range": "" | ||
} | ||
] | ||
} | ||
], | ||
"packageEntries": [ | ||
{ | ||
"@id": "http://example/data/2017.01.04.08.15.00/emptydependencyversionrange.0.1.0.json#EmptyDependencyVersionRange.nuspec", | ||
"@type": "PackageEntry", | ||
"compressedLength": 248, | ||
"fullName": "EmptyDependencyVersionRange.nuspec", | ||
"length": 504, | ||
"name": "EmptyDependencyVersionRange.nuspec" | ||
} | ||
], | ||
"@context": { | ||
"@vocab": "http://schema.nuget.org/schema#", | ||
"catalog": "http://schema.nuget.org/catalog#", | ||
"xsd": "http://www.w3.org/2001/XMLSchema#", | ||
"dependencies": { | ||
"@id": "dependency", | ||
"@container": "@set" | ||
}, | ||
"dependencyGroups": { | ||
"@id": "dependencyGroup", | ||
"@container": "@set" | ||
}, | ||
"packageEntries": { | ||
"@id": "packageEntry", | ||
"@container": "@set" | ||
}, | ||
"supportedFrameworks": { | ||
"@id": "supportedFramework", | ||
"@container": "@set" | ||
}, | ||
"tags": { | ||
"@id": "tag", | ||
"@container": "@set" | ||
}, | ||
"published": { | ||
"@type": "xsd:dateTime" | ||
}, | ||
"created": { | ||
"@type": "xsd:dateTime" | ||
}, | ||
"lastEdited": { | ||
"@type": "xsd:dateTime" | ||
}, | ||
"catalog:commitTimeStamp": { | ||
"@type": "xsd:dateTime" | ||
} | ||
} | ||
} |
Binary file added
BIN
+450 Bytes
tests/CatalogTests/TestData/EmptyDependencyVersionRange.0.1.0.nupkg
Binary file not shown.
84 changes: 84 additions & 0 deletions
84
tests/CatalogTests/TestData/InvalidDependencyVersionRange.0.1.0.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"@id": "http://example/data/2017.01.04.08.15.00/invaliddependencyversionrange.0.1.0.json", | ||
"@type": [ | ||
"PackageDetails", | ||
"catalog:Permalink" | ||
], | ||
"authors": "InvalidDependencyVersionRange", | ||
"catalog:commitId": "4aee0ef4-a039-4460-bd5f-98f944e33289", | ||
"catalog:commitTimeStamp": "2017-01-04T08:15:00Z", | ||
"created": "2017-01-01T08:15:00Z", | ||
"description": "InvalidDependencyVersionRange", | ||
"id": "InvalidDependencyVersionRange", | ||
"isPrerelease": false, | ||
"lastEdited": "2017-01-02T08:15:00Z", | ||
"listed": true, | ||
"packageHash": "RFCB7aV+m/vj0CYW3SmnLUd8jMYYJpOw+fz7hDNERlwUjz2rU+6lCVA2bdIko3YYc68jJN3n07S2OgKrUDwPBg==", | ||
"packageHashAlgorithm": "SHA512", | ||
"packageSize": 473, | ||
"published": "2017-01-03T08:15:00Z", | ||
"title": "InvalidDependencyVersionRange", | ||
"verbatimVersion": "0.1.0", | ||
"version": "0.1.0", | ||
"dependencyGroups": [ | ||
{ | ||
"@id": "http://example/data/2017.01.04.08.15.00/invaliddependencyversionrange.0.1.0.json#dependencygroup", | ||
"@type": "PackageDependencyGroup", | ||
"dependencies": [ | ||
{ | ||
"@id": "http://example/data/2017.01.04.08.15.00/invaliddependencyversionrange.0.1.0.json#dependencygroup/nuget.versioning", | ||
"@type": "PackageDependency", | ||
"id": "NuGet.Versioning", | ||
"range": "" | ||
} | ||
] | ||
} | ||
], | ||
"packageEntries": [ | ||
{ | ||
"@id": "http://example/data/2017.01.04.08.15.00/invaliddependencyversionrange.0.1.0.json#InvalidDependencyVersionRange.nuspec", | ||
"@type": "PackageEntry", | ||
"compressedLength": 267, | ||
"fullName": "InvalidDependencyVersionRange.nuspec", | ||
"length": 530, | ||
"name": "InvalidDependencyVersionRange.nuspec" | ||
} | ||
], | ||
"@context": { | ||
"@vocab": "http://schema.nuget.org/schema#", | ||
"catalog": "http://schema.nuget.org/catalog#", | ||
"xsd": "http://www.w3.org/2001/XMLSchema#", | ||
"dependencies": { | ||
"@id": "dependency", | ||
"@container": "@set" | ||
}, | ||
"dependencyGroups": { | ||
"@id": "dependencyGroup", | ||
"@container": "@set" | ||
}, | ||
"packageEntries": { | ||
"@id": "packageEntry", | ||
"@container": "@set" | ||
}, | ||
"supportedFrameworks": { | ||
"@id": "supportedFramework", | ||
"@container": "@set" | ||
}, | ||
"tags": { | ||
"@id": "tag", | ||
"@container": "@set" | ||
}, | ||
"published": { | ||
"@type": "xsd:dateTime" | ||
}, | ||
"created": { | ||
"@type": "xsd:dateTime" | ||
}, | ||
"lastEdited": { | ||
"@type": "xsd:dateTime" | ||
}, | ||
"catalog:commitTimeStamp": { | ||
"@type": "xsd:dateTime" | ||
} | ||
} | ||
} |
Binary file added
BIN
+473 Bytes
tests/CatalogTests/TestData/InvalidDependencyVersionRange.0.1.0.nupkg
Binary file not shown.
Oops, something went wrong.