From b60898e0bccbb0b0ddad74df6370e826cb9b7494 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 17 Feb 2021 16:07:57 -0600 Subject: Add failing test for #3897. --- .../SlipstreamTests/BundleD/BundleD.wixproj | 19 ++++++++++++++++++ src/TestData/SlipstreamTests/BundleD/BundleD.wxs | 12 +++++++++++ src/WixToolsetTest.BurnE2E/SlipstreamTests.cs | 23 ++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 src/TestData/SlipstreamTests/BundleD/BundleD.wixproj create mode 100644 src/TestData/SlipstreamTests/BundleD/BundleD.wxs (limited to 'src') diff --git a/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj new file mode 100644 index 00000000..db257df6 --- /dev/null +++ b/src/TestData/SlipstreamTests/BundleD/BundleD.wixproj @@ -0,0 +1,19 @@ + + + + Bundle + {5372D18C-8C62-4C22-A24B-6BB2FB4AA966} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TestData/SlipstreamTests/BundleD/BundleD.wxs b/src/TestData/SlipstreamTests/BundleD/BundleD.wxs new file mode 100644 index 00000000..64bdc1b5 --- /dev/null +++ b/src/TestData/SlipstreamTests/BundleD/BundleD.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs b/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs index 9d53f999..0d7be0ca 100644 --- a/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs +++ b/src/WixToolsetTest.BurnE2E/SlipstreamTests.cs @@ -326,5 +326,28 @@ namespace WixToolsetTest.BurnE2E packageAv1.VerifyInstalled(false); packageAv1.VerifyTestRegistryRootDeleted(); } + + [Fact(Skip = "https://github.com/wixtoolset/issues/issues/3897")] + public void RespectsSlipstreamedPatchInstallCondition() + { + var testRegistryValue = "PackageA"; + + var packageAv1 = this.CreatePackageInstaller("PackageAv1"); + var bundleD = this.CreateBundleInstaller("BundleD"); + + var packageAv1SourceCodeInstalled = packageAv1.GetInstalledFilePath("Package.wxs"); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), $"PackageAv1 payload should not be there on test start: {packageAv1SourceCodeInstalled}"); + + bundleD.Install(); + bundleD.VerifyRegisteredAndInPackageCache(); + Assert.True(File.Exists(packageAv1SourceCodeInstalled), String.Concat("Should have found PackageAv1 payload installed at: ", packageAv1SourceCodeInstalled)); + // The patch was not supposed to be installed. + packageAv1.VerifyTestRegistryValue(testRegistryValue, V100); + + bundleD.Uninstall(); + bundleD.VerifyUnregisteredAndRemovedFromPackageCache(); + Assert.False(File.Exists(packageAv1SourceCodeInstalled), String.Concat("PackageAv1 payload should have been removed by uninstall from: ", packageAv1SourceCodeInstalled)); + packageAv1.VerifyTestRegistryRootDeleted(); + } } } -- cgit v1.2.3-55-g6feb