diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2022-02-10 18:09:34 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2022-02-10 19:51:19 -0600 |
| commit | 27a0db4070a2b5756282bf15b957dd7f0021417f (patch) | |
| tree | 2d0cdfe80d5ccd6d207bdf664a4f8e512281c1cf /src/test | |
| parent | 091573d459d6ab4947bd39bd3bc8faee3d18b4fc (diff) | |
| download | wix-27a0db4070a2b5756282bf15b957dd7f0021417f.tar.gz wix-27a0db4070a2b5756282bf15b957dd7f0021417f.tar.bz2 wix-27a0db4070a2b5756282bf15b957dd7f0021417f.zip | |
When rolling back a bundle failure, reinstall all upgrade related bundles.
Fixes #3421
Diffstat (limited to 'src/test')
6 files changed, 75 insertions, 2 deletions
diff --git a/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv3/BundleAv3.wixproj b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv3/BundleAv3.wixproj new file mode 100644 index 00000000..958ceb47 --- /dev/null +++ b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv3/BundleAv3.wixproj | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 2 | <Project Sdk="WixToolset.Sdk"> | ||
| 3 | <Import Project="..\BundleAv1\BundleA.props" /> | ||
| 4 | <PropertyGroup> | ||
| 5 | <Version>3.0.0.0</Version> | ||
| 6 | </PropertyGroup> | ||
| 7 | <ItemGroup> | ||
| 8 | <ProjectReference Include="..\PackageAv3\PackageAv3.wixproj" /> | ||
| 9 | <ProjectReference Include="..\PackageF\PackageF.wixproj" /> | ||
| 10 | <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" /> | ||
| 11 | </ItemGroup> | ||
| 12 | <ItemGroup> | ||
| 13 | <PackageReference Include="WixToolset.Bal.wixext" /> | ||
| 14 | <PackageReference Include="WixToolset.NetFx.wixext" /> | ||
| 15 | </ItemGroup> | ||
| 16 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv3/BundleAv3.wxs b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv3/BundleAv3.wxs new file mode 100644 index 00000000..b969b504 --- /dev/null +++ b/src/test/burn/TestData/UpgradeRelatedBundleTests/BundleAv3/BundleAv3.wxs | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 2 | |||
| 3 | |||
| 4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| 5 | <Fragment> | ||
| 6 | <PackageGroup Id="BundlePackages"> | ||
| 7 | <MsiPackage Id="PackageA" SourceFile="$(var.PackageAv3.TargetPath)" /> | ||
| 8 | <MsiPackage Id="PackageF" SourceFile="$(var.PackageF.TargetPath)" /> | ||
| 9 | </PackageGroup> | ||
| 10 | </Fragment> | ||
| 11 | </Wix> | ||
diff --git a/src/test/burn/TestData/UpgradeRelatedBundleTests/PackageAv3/PackageAv3.wixproj b/src/test/burn/TestData/UpgradeRelatedBundleTests/PackageAv3/PackageAv3.wixproj new file mode 100644 index 00000000..f3c121af --- /dev/null +++ b/src/test/burn/TestData/UpgradeRelatedBundleTests/PackageAv3/PackageAv3.wixproj | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 2 | <Project Sdk="WixToolset.Sdk"> | ||
| 3 | <Import Project="..\PackageAv1\PackageA.props" /> | ||
| 4 | <PropertyGroup> | ||
| 5 | <Version>3.0.0.0</Version> | ||
| 6 | </PropertyGroup> | ||
| 7 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/UpgradeRelatedBundleTests/PackageF/PackageF.wixproj b/src/test/burn/TestData/UpgradeRelatedBundleTests/PackageF/PackageF.wixproj new file mode 100644 index 00000000..63d32e28 --- /dev/null +++ b/src/test/burn/TestData/UpgradeRelatedBundleTests/PackageF/PackageF.wixproj | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 2 | <Project Sdk="WixToolset.Sdk"> | ||
| 3 | <PropertyGroup> | ||
| 4 | <UpgradeCode>{8F6C8C4B-573C-416B-B1B0-467273256BD9}</UpgradeCode> | ||
| 5 | </PropertyGroup> | ||
| 6 | <ItemGroup> | ||
| 7 | <Compile Include="..\..\Templates\PackageFail.wxs" Link="PackageFail.wxs" /> | ||
| 8 | </ItemGroup> | ||
| 9 | <ItemGroup> | ||
| 10 | <PackageReference Include="WixToolset.Util.wixext" /> | ||
| 11 | </ItemGroup> | ||
| 12 | </Project> \ No newline at end of file | ||
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/DependencyTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/DependencyTests.cs index 69a1fa68..ba02d8ee 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/DependencyTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/DependencyTests.cs | |||
| @@ -539,7 +539,7 @@ namespace WixToolsetTest.BurnE2E | |||
| 539 | } | 539 | } |
| 540 | } | 540 | } |
| 541 | 541 | ||
| 542 | [Fact(Skip = "https://github.com/wixtoolset/issues/issues/3421")] | 542 | [Fact] |
| 543 | public void DoesntLoseDependenciesOnFailedMajorUpgradeBundleFromMajorUpdateMsiFifo() | 543 | public void DoesntLoseDependenciesOnFailedMajorUpgradeBundleFromMajorUpdateMsiFifo() |
| 544 | { | 544 | { |
| 545 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); | 545 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); |
| @@ -611,7 +611,7 @@ namespace WixToolsetTest.BurnE2E | |||
| 611 | packageGv2.VerifyInstalled(false); | 611 | packageGv2.VerifyInstalled(false); |
| 612 | } | 612 | } |
| 613 | 613 | ||
| 614 | [Fact(Skip = "https://github.com/wixtoolset/issues/issues/3421")] | 614 | [Fact] |
| 615 | public void DoesntLoseDependenciesOnFailedMajorUpgradeBundleFromMajorUpdateMsiLifo() | 615 | public void DoesntLoseDependenciesOnFailedMajorUpgradeBundleFromMajorUpdateMsiLifo() |
| 616 | { | 616 | { |
| 617 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); | 617 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); |
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs index 9eb5081e..32a04e5c 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/UpgradeRelatedBundleTests.cs | |||
| @@ -13,6 +13,33 @@ namespace WixToolsetTest.BurnE2E | |||
| 13 | public UpgradeRelatedBundleTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | 13 | public UpgradeRelatedBundleTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } |
| 14 | 14 | ||
| 15 | [Fact] | 15 | [Fact] |
| 16 | public void ReinstallsOlderBundleAfterFailure() | ||
| 17 | { | ||
| 18 | var packageAv2 = this.CreatePackageInstaller("PackageAv2"); | ||
| 19 | var packageAv3 = this.CreatePackageInstaller("PackageAv3"); | ||
| 20 | var bundleAv2 = this.CreateBundleInstaller("BundleAv2"); | ||
| 21 | var bundleAv3 = this.CreateBundleInstaller("BundleAv3"); | ||
| 22 | |||
| 23 | packageAv2.VerifyInstalled(false); | ||
| 24 | packageAv3.VerifyInstalled(false); | ||
| 25 | |||
| 26 | bundleAv2.Install(); | ||
| 27 | bundleAv2.VerifyRegisteredAndInPackageCache(); | ||
| 28 | |||
| 29 | packageAv2.VerifyInstalled(true); | ||
| 30 | packageAv3.VerifyInstalled(false); | ||
| 31 | |||
| 32 | // Verify https://github.com/wixtoolset/issues/issues/3421 | ||
| 33 | var bundleAv3InstallLogFilePath = bundleAv3.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_FAILURE); | ||
| 34 | bundleAv3.VerifyUnregisteredAndRemovedFromPackageCache(); | ||
| 35 | |||
| 36 | Assert.True(LogVerifier.MessageInLogFileRegex(bundleAv3InstallLogFilePath, @"Applied execute package: PackageA, result: 0x0, restart: None")); | ||
| 37 | |||
| 38 | packageAv2.VerifyInstalled(true); | ||
| 39 | packageAv3.VerifyInstalled(false); | ||
| 40 | } | ||
| 41 | |||
| 42 | [Fact] | ||
| 16 | public void ReportsRelatedBundleMissingFromCache() | 43 | public void ReportsRelatedBundleMissingFromCache() |
| 17 | { | 44 | { |
| 18 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); | 45 | var packageAv1 = this.CreatePackageInstaller("PackageAv1"); |
