Skip to content

Commit

Permalink
Add missing ReturnResponseUrl to WinGetUtilInterop manifest (microsof…
Browse files Browse the repository at this point in the history
  • Loading branch information
yao-msft authored Dec 4, 2024
1 parent 4ad9e40 commit a54bbbe
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ private void ValidateManifestFields(Manifest manifest, TestManifestVersion manif

Assert.True(manifest.DisplayInstallWarnings);
Assert.True(manifest.DownloadCommandProhibited);

Assert.Equal("https://defaultReturnResponseUrl.com", manifest.ExpectedReturnCodes[0].ReturnResponseUrl);
}

if (manifestVersion >= TestManifestVersion.V170)
Expand Down Expand Up @@ -373,6 +375,8 @@ private void ValidateManifestFields(Manifest manifest, TestManifestVersion manif

Assert.True(installer1.DisplayInstallWarnings);
Assert.True(installer1.DownloadCommandProhibited);

Assert.Equal("https://returnResponseUrl.com", installer1.ExpectedReturnCodes[0].ReturnResponseUrl);
}

if (manifestVersion >= TestManifestVersion.V170)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ ExpectedReturnCodes:
ReturnResponse: contactSupport
- InstallerReturnCode: 3
ReturnResponse: custom
ReturnResponseUrl: https://defaultReturnResponseUrl.com
FileExtensions:
- appx
- msix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ Markets:
- US
ExpectedReturnCodes:
- InstallerReturnCode: 2
ReturnResponse: contactSupport
ReturnResponse: contactSupport
ReturnResponseUrl: https://defaultReturnResponseUrl.com
- InstallerReturnCode: 3
ReturnResponse: custom
ReturnResponseUrl: https://defaultReturnResponseUrl.com
UnsupportedArguments:
- log
NestedInstallerType: msi
Expand Down Expand Up @@ -225,8 +225,9 @@ Installers:
ExcludedMarkets:
- "US"
ExpectedReturnCodes:
- InstallerReturnCode: 2
ReturnResponse: contactSupport
- InstallerReturnCode: 2
ReturnResponse: contactSupport
ReturnResponseUrl: https://returnResponseUrl.com
DownloadCommandProhibited: true
InstallationMetadata:
DefaultInstallLocation: "%ProgramFiles%\\TestApp"
Expand All @@ -242,4 +243,4 @@ Installers:
InstallerType: exe
ProductCode: '{Bar}'
ManifestType: merged
ManifestVersion: 1.6.0
ManifestVersion: 1.6.0
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ Markets:
- US
ExpectedReturnCodes:
- InstallerReturnCode: 2
ReturnResponse: contactSupport
ReturnResponse: contactSupport
ReturnResponseUrl: https://defaultReturnResponseUrl.com
- InstallerReturnCode: 3
ReturnResponse: custom
ReturnResponseUrl: https://defaultReturnResponseUrl.com
UnsupportedArguments:
- log
NestedInstallerType: msi
Expand Down Expand Up @@ -228,8 +228,9 @@ Installers:
ExcludedMarkets:
- "US"
ExpectedReturnCodes:
- InstallerReturnCode: 2
ReturnResponse: contactSupport
- InstallerReturnCode: 2
ReturnResponse: contactSupport
ReturnResponseUrl: https://returnResponseUrl.com
DownloadCommandProhibited: true
RepairBehavior: modify
InstallationMetadata:
Expand All @@ -246,4 +247,4 @@ Installers:
InstallerType: exe
ProductCode: '{Bar}'
ManifestType: merged
ManifestVersion: 1.7.0
ManifestVersion: 1.7.0
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ Markets:
- US
ExpectedReturnCodes:
- InstallerReturnCode: 2
ReturnResponse: contactSupport
ReturnResponse: contactSupport
ReturnResponseUrl: https://defaultReturnResponseUrl.com
- InstallerReturnCode: 3
ReturnResponse: custom
ReturnResponseUrl: https://defaultReturnResponseUrl.com
UnsupportedArguments:
- log
NestedInstallerType: msi
Expand Down Expand Up @@ -229,8 +229,9 @@ Installers:
ExcludedMarkets:
- "US"
ExpectedReturnCodes:
- InstallerReturnCode: 2
ReturnResponse: contactSupport
- InstallerReturnCode: 2
ReturnResponse: contactSupport
ReturnResponseUrl: https://returnResponseUrl.com
DownloadCommandProhibited: true
ArchiveBinariesDependOnPath: false
RepairBehavior: modify
Expand Down
11 changes: 8 additions & 3 deletions src/WinGetUtilInterop/Manifest/V1/InstallerExpectedReturnCode.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// <copyright file="InstallerExpectedReturnCode.cs" company="Microsoft Corporation">
// Copyright (c) Microsoft Corporation. Licensed under the MIT License.
// </copyright>
Expand All @@ -19,6 +19,11 @@ public class InstallerExpectedReturnCode
/// <summary>
/// Gets or sets the corresponding response category.
/// </summary>
public string ReturnResponse { get; set; }
public string ReturnResponse { get; set; }

/// <summary>
/// Gets or sets the corresponding response url.
/// </summary>
public string ReturnResponseUrl { get; set; }
}
}
}

0 comments on commit a54bbbe

Please sign in to comment.