commit a54bbbe047d3b3eac54c9d7668827864afce0a9b parent 4ad9e4035e68a6a043f9fb7b2c74ed3fa9e9fa0e Author: yao-msft <50888816+yao-msft@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:58:12 -0800 Add missing ReturnResponseUrl to WinGetUtilInterop manifest (#5035) Diffstat:
6 files changed, 29 insertions(+), 21 deletions(-)
diff --git a/src/WinGetUtilInterop.UnitTests/ManifestUnitTest/V1ManifestReadTest.cs b/src/WinGetUtilInterop.UnitTests/ManifestUnitTest/V1ManifestReadTest.cs @@ -264,6 +264,8 @@ namespace WinGetUtilInterop.UnitTests.ManifestUnitTest Assert.True(manifest.DisplayInstallWarnings); Assert.True(manifest.DownloadCommandProhibited); + + Assert.Equal("https://defaultReturnResponseUrl.com", manifest.ExpectedReturnCodes[0].ReturnResponseUrl); } if (manifestVersion >= TestManifestVersion.V170) @@ -373,6 +375,8 @@ namespace WinGetUtilInterop.UnitTests.ManifestUnitTest Assert.True(installer1.DisplayInstallWarnings); Assert.True(installer1.DownloadCommandProhibited); + + Assert.Equal("https://returnResponseUrl.com", installer1.ExpectedReturnCodes[0].ReturnResponseUrl); } if (manifestVersion >= TestManifestVersion.V170) diff --git a/src/WinGetUtilInterop.UnitTests/TestCollateral/V1_1ManifestMerged.yaml b/src/WinGetUtilInterop.UnitTests/TestCollateral/V1_1ManifestMerged.yaml @@ -34,7 +34,6 @@ ExpectedReturnCodes: ReturnResponse: contactSupport - InstallerReturnCode: 3 ReturnResponse: custom - ReturnResponseUrl: https://defaultReturnResponseUrl.com FileExtensions: - appx - msix diff --git a/src/WinGetUtilInterop.UnitTests/TestCollateral/V1_6ManifestMerged.yaml b/src/WinGetUtilInterop.UnitTests/TestCollateral/V1_6ManifestMerged.yaml @@ -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 @@ -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" @@ -242,4 +243,4 @@ Installers: InstallerType: exe ProductCode: '{Bar}' ManifestType: merged -ManifestVersion: 1.6.0- \ No newline at end of file +ManifestVersion: 1.6.0 diff --git a/src/WinGetUtilInterop.UnitTests/TestCollateral/V1_7ManifestMerged.yaml b/src/WinGetUtilInterop.UnitTests/TestCollateral/V1_7ManifestMerged.yaml @@ -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 @@ -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: @@ -246,4 +247,4 @@ Installers: InstallerType: exe ProductCode: '{Bar}' ManifestType: merged -ManifestVersion: 1.7.0- \ No newline at end of file +ManifestVersion: 1.7.0 diff --git a/src/WinGetUtilInterop.UnitTests/TestCollateral/V1_9ManifestMerged.yaml b/src/WinGetUtilInterop.UnitTests/TestCollateral/V1_9ManifestMerged.yaml @@ -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 @@ -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 diff --git a/src/WinGetUtilInterop/Manifest/V1/InstallerExpectedReturnCode.cs b/src/WinGetUtilInterop/Manifest/V1/InstallerExpectedReturnCode.cs @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // <copyright file="InstallerExpectedReturnCode.cs" company="Microsoft Corporation"> // Copyright (c) Microsoft Corporation. Licensed under the MIT License. // </copyright> @@ -19,6 +19,11 @@ namespace Microsoft.WinGetUtil.Models.V1 /// <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; } } -}- \ No newline at end of file +}