Add failing dependency E2E tests.
Sean Hall committed
Jan 21, 2022 at 16:25 UTC
af019d2b6d7b67df34355c038290d45366001ea9
26 files changed
+399
-11
src/test/burn/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj
+1
-1
@@ -2,7 +2,7 @@
2
<Project Sdk="WixToolset.Sdk">
3
<Import Project="BundleK.props" />
4
<ItemGroup>
5
- <ProjectReference Include="..\PackageF\PackageF.wixproj" />
5
+ <ProjectReference Include="..\PackageFv1\PackageFv1.wixproj" />
6
<ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
7
</ItemGroup>
8
<ItemGroup>
src/test/burn/TestData/DependencyTests/BundleKv1/BundleKv1.wxs
+1
-1
@@ -4,7 +4,7 @@
4
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
5
<Fragment>
6
<PackageGroup Id="BundlePackages">
7
- <MsiPackage Id="PackageF" SourceFile="$(var.PackageF.TargetPath)" />
7
+ <MsiPackage Id="PackageF" SourceFile="$(var.PackageFv1.TargetPath)" />
8
</PackageGroup>
9
</Fragment>
10
</Wix>
src/test/burn/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj
+1
-1
@@ -5,7 +5,7 @@
5
<Version>2.0.0.0</Version>
6
</PropertyGroup>
7
<ItemGroup>
8
- <ProjectReference Include="..\PackageF\PackageF.wixproj" />
8
+ <ProjectReference Include="..\PackageFv1\PackageFv1.wixproj" />
9
<ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
10
</ItemGroup>
11
<ItemGroup>
src/test/burn/TestData/DependencyTests/BundleKv2/BundleKv2.wxs
+1
-1
@@ -4,7 +4,7 @@
4
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
5
<Fragment>
6
<PackageGroup Id="BundlePackages">
7
- <MsiPackage Id="PackageF" SourceFile="$(var.PackageF.TargetPath)" />
7
+ <MsiPackage Id="PackageF" SourceFile="$(var.PackageFv1.TargetPath)" />
8
</PackageGroup>
9
</Fragment>
10
</Wix>
src/test/burn/TestData/DependencyTests/BundleM/BundleM.wixproj
new
+20
@@ -0,0 +1,20 @@
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
+ <OutputType>Bundle</OutputType>
5
+ <UpgradeCode>{D106D5F7-CA25-4AC4-8EE9-A9CF8C2C7941}</UpgradeCode>
6
+ </PropertyGroup>
7
+ <ItemGroup>
8
+ <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
9
+ </ItemGroup>
10
+ <ItemGroup>
11
+ <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
12
+ <ProjectReference Include="..\PackageFv1\PackageFv1.wixproj" />
13
+ <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
14
+ </ItemGroup>
15
+ <ItemGroup>
16
+ <PackageReference Include="WixToolset.Bal.wixext" />
17
+ <PackageReference Include="WixToolset.NetFx.wixext" />
18
+ <PackageReference Include="WixToolset.Util.wixext" />
19
+ </ItemGroup>
20
+</Project>
\ No newline at end of file
src/test/burn/TestData/DependencyTests/BundleM/BundleM.wxs
new
+10
@@ -0,0 +1,10 @@
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
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
4
+ <Fragment>
5
+ <PackageGroup Id="BundlePackages">
6
+ <MsiPackage Id="PackageA" SourceFile="$(var.PackageAv1.TargetPath)" />
7
+ <MsiPackage Id="PackageF" SourceFile="$(var.PackageFv1.TargetPath)" />
8
+ </PackageGroup>
9
+ </Fragment>
10
+</Wix>
src/test/burn/TestData/DependencyTests/BundleNv1/BundleN.props
new
+10
@@ -0,0 +1,10 @@
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>
3
+ <PropertyGroup>
4
+ <OutputType>Bundle</OutputType>
5
+ <UpgradeCode>{8F2B8413-CBA1-4284-BA4F-0005FE35E7B9}</UpgradeCode>
6
+ </PropertyGroup>
7
+ <ItemGroup>
8
+ <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
9
+ </ItemGroup>
10
+</Project>
src/test/burn/TestData/DependencyTests/BundleNv1/BundleNv1.wixproj
new
+13
@@ -0,0 +1,13 @@
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="BundleN.props" />
4
+ <ItemGroup>
5
+ <ProjectReference Include="..\PackageFv1\PackageFv1.wixproj" />
6
+ <ProjectReference Include="..\PackageGv1\PackageGv1.wixproj" />
7
+ <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
8
+ </ItemGroup>
9
+ <ItemGroup>
10
+ <PackageReference Include="WixToolset.Bal.wixext" />
11
+ <PackageReference Include="WixToolset.NetFx.wixext" />
12
+ </ItemGroup>
13
+</Project>
\ No newline at end of file
src/test/burn/TestData/DependencyTests/BundleNv1/BundleNv1.wxs
new
+11
@@ -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="PackageF" SourceFile="$(var.PackageFv1.TargetPath)" />
8
+ <MsiPackage Id="PackageG" SourceFile="$(var.PackageGv1.TargetPath)" />
9
+ </PackageGroup>
10
+ </Fragment>
11
+</Wix>
src/test/burn/TestData/DependencyTests/BundleNv1_0_1/BundleNv1_0_1.wixproj
new
+17
@@ -0,0 +1,17 @@
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="..\BundleNv1\BundleN.props" />
4
+ <PropertyGroup>
5
+ <Version>1.0.1.0</Version>
6
+ </PropertyGroup>
7
+ <ItemGroup>
8
+ <ProjectReference Include="..\PackageC\PackageC.wixproj" />
9
+ <ProjectReference Include="..\PackageFv1_0_1\PackageFv1_0_1.wixproj" />
10
+ <ProjectReference Include="..\PackageGv1_0_1\PackageGv1_0_1.wixproj" />
11
+ <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
12
+ </ItemGroup>
13
+ <ItemGroup>
14
+ <PackageReference Include="WixToolset.Bal.wixext" />
15
+ <PackageReference Include="WixToolset.NetFx.wixext" />
16
+ </ItemGroup>
17
+</Project>
\ No newline at end of file
src/test/burn/TestData/DependencyTests/BundleNv1_0_1/BundleNv1_0_1.wxs
new
+12
@@ -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
+
3
+
4
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
5
+ <Fragment>
6
+ <PackageGroup Id="BundlePackages">
7
+ <MsiPackage Id="PackageF" Name="PackageFv1.msi" SourceFile="$(var.PackageFv1_0_1.TargetPath)" />
8
+ <MsiPackage Id="PackageG" Name="PackageGv1.msi" SourceFile="$(var.PackageGv1_0_1.TargetPath)" />
9
+ <MsiPackage Id="PackageC" SourceFile="$(var.PackageC.TargetPath)" />
10
+ </PackageGroup>
11
+ </Fragment>
12
+</Wix>
src/test/burn/TestData/DependencyTests/BundleNv2/BundleNv2.wixproj
new
+17
@@ -0,0 +1,17 @@
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="..\BundleNv1\BundleN.props" />
4
+ <PropertyGroup>
5
+ <Version>2.0.0.0</Version>
6
+ </PropertyGroup>
7
+ <ItemGroup>
8
+ <ProjectReference Include="..\PackageC\PackageC.wixproj" />
9
+ <ProjectReference Include="..\PackageFv2\PackageFv2.wixproj" />
10
+ <ProjectReference Include="..\PackageGv2\PackageGv2.wixproj" />
11
+ <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
12
+ </ItemGroup>
13
+ <ItemGroup>
14
+ <PackageReference Include="WixToolset.Bal.wixext" />
15
+ <PackageReference Include="WixToolset.NetFx.wixext" />
16
+ </ItemGroup>
17
+</Project>
\ No newline at end of file
src/test/burn/TestData/DependencyTests/BundleNv2/BundleNv2.wxs
new
+12
@@ -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
+
3
+
4
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
5
+ <Fragment>
6
+ <PackageGroup Id="BundlePackages">
7
+ <MsiPackage Id="PackageF" SourceFile="$(var.PackageFv2.TargetPath)" />
8
+ <MsiPackage Id="PackageG" SourceFile="$(var.PackageGv2.TargetPath)" />
9
+ <MsiPackage Id="PackageC" SourceFile="$(var.PackageC.TargetPath)" />
10
+ </PackageGroup>
11
+ </Fragment>
12
+</Wix>
src/test/burn/TestData/DependencyTests/PackageC/PackageC.wixproj
-1
@@ -7,7 +7,6 @@
7
<Compile Include="..\..\Templates\Package.wxs" Link="Package.wxs" />
8
</ItemGroup>
9
<ItemGroup>
10
- <PackageReference Include="WixToolset.Dependency.wixext" />
10
<PackageReference Include="WixToolset.Util.wixext" />
11
</ItemGroup>
12
</Project>
\ No newline at end of file
src/test/burn/TestData/DependencyTests/PackageFv1/PackageF.props
renamed
+2
-1
@@ -1,6 +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">
2
+<Project>
3
<PropertyGroup>
4
+ <PackageName>PackageF</PackageName>
5
<UpgradeCode>{069AECC6-84DC-4FA4-B506-CD3A9A76F2F4}</UpgradeCode>
6
</PropertyGroup>
7
<ItemGroup>
src/test/burn/TestData/DependencyTests/PackageFv1/PackageFv1.props
new
+7
@@ -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>
3
+ <Import Project="PackageF.props" />
4
+ <PropertyGroup>
5
+ <ProductCode>{9FD1A4DA-B62B-48F2-851F-7CE01AC10009}</ProductCode>
6
+ </PropertyGroup>
7
+</Project>
\ No newline at end of file
src/test/burn/TestData/DependencyTests/PackageFv1/PackageFv1.wixproj
new
+4
@@ -0,0 +1,4 @@
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="PackageFv1.props" />
4
+</Project>
\ No newline at end of file
src/test/burn/TestData/DependencyTests/PackageFv1_0_1/PackageFv1_0_1.wixproj
new
+7
@@ -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="..\PackageFv1\PackageFv1.props" />
4
+ <PropertyGroup>
5
+ <Version>1.0.1.0</Version>
6
+ </PropertyGroup>
7
+</Project>
\ No newline at end of file
src/test/burn/TestData/DependencyTests/PackageFv2/PackageFv2.wixproj
new
+7
@@ -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="..\PackageFv1\PackageF.props" />
4
+ <PropertyGroup>
5
+ <Version>2.0.0.0</Version>
6
+ </PropertyGroup>
7
+</Project>
\ No newline at end of file
src/test/burn/TestData/DependencyTests/PackageGv1/PackageG.props
new
+10
@@ -0,0 +1,10 @@
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>
3
+ <PropertyGroup>
4
+ <PackageName>PackageG</PackageName>
5
+ <UpgradeCode>{CFBC162E-8D89-40A7-8E07-7B46E3B27C26}</UpgradeCode>
6
+ </PropertyGroup>
7
+ <ItemGroup>
8
+ <Compile Include="..\..\Templates\Package.wxs" Link="Package.wxs" />
9
+ </ItemGroup>
10
+</Project>
\ No newline at end of file
src/test/burn/TestData/DependencyTests/PackageGv1/PackageGv1.props
new
+7
@@ -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>
3
+ <Import Project="PackageG.props" />
4
+ <PropertyGroup>
5
+ <ProductCode>{56169850-B98A-4D9B-AF5D-8974B6807FE9}</ProductCode>
6
+ </PropertyGroup>
7
+</Project>
\ No newline at end of file
src/test/burn/TestData/DependencyTests/PackageGv1/PackageGv1.wixproj
new
+4
@@ -0,0 +1,4 @@
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="PackageGv1.props" />
4
+</Project>
\ No newline at end of file
src/test/burn/TestData/DependencyTests/PackageGv1_0_1/PackageGv1_0_1.wixproj
new
+7
@@ -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="..\PackageGv1\PackageGv1.props" />
4
+ <PropertyGroup>
5
+ <Version>1.0.1.0</Version>
6
+ </PropertyGroup>
7
+</Project>
\ No newline at end of file
src/test/burn/TestData/DependencyTests/PackageGv2/PackageGv2.wixproj
new
+7
@@ -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="..\PackageGv1\PackageG.props" />
4
+ <PropertyGroup>
5
+ <Version>2.0.0.0</Version>
6
+ </PropertyGroup>
7
+</Project>
\ No newline at end of file
src/test/burn/WixTestTools/BundleVerifier.cs
+17
@@ -14,6 +14,7 @@ namespace WixTestTools
14
15
public partial class BundleInstaller
16
{
17
+ public const string DependencyRegistryRoot = "Software\\Classes\\Installer\\Dependencies";
18
public const string FULL_BURN_POLICY_REGISTRY_PATH = "SOFTWARE\\WOW6432Node\\Policies\\WiX\\Burn";
19
public const string PACKAGE_CACHE_FOLDER_NAME = "Package Cache";
20
@@ -134,6 +135,22 @@ namespace WixTestTools
135
Assert.Equal(cached, Directory.Exists(cachePath));
136
}
137
138
+ public void VerifyPackageProviderRemoved(string packageId)
139
+ {
140
+ using var wixOutput = WixOutput.Read(this.BundlePdb);
141
+ var intermediate = Intermediate.Load(wixOutput);
142
+ var section = intermediate.Sections.Single();
143
+ var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().Single(p => p.Id.Id == packageId);
144
+ var providerSymbol = section.Symbols.OfType<WixDependencyProviderSymbol>().Single(p => p.ParentRef == packageId);
145
+ var registryRoot = packageSymbol.PerMachine == YesNoDefaultType.Yes ? Registry.LocalMachine : Registry.CurrentUser;
146
+ var subkeyPath = Path.Combine(DependencyRegistryRoot, providerSymbol.ProviderKey);
147
+ using var registryKey = registryRoot.OpenSubKey(subkeyPath);
148
+ if (registryKey != null)
149
+ {
150
+ WixAssert.StringEqual(null, subkeyPath);
151
+ }
152
+ }
153
+
154
public void VerifyExeTestRegistryRootDeleted(string name, bool x64 = false)
155
{
156
using var testRegistryRoot = this.TestContext.GetTestRegistryRoot(x64, name);
src/test/burn/WixToolsetTest.BurnE2E/DependencyTests.cs
+194
-5
@@ -15,29 +15,29 @@ namespace WixToolsetTest.BurnE2E
15
[Fact]
16
public void CanKeepSameExactPackageAfterUpgradingBundle()
17
{
18
- var packageF = this.CreatePackageInstaller("PackageF");
18
+ var packageFv1 = this.CreatePackageInstaller("PackageFv1");
19
var bundleKv1 = this.CreateBundleInstaller("BundleKv1");
20
var bundleKv2 = this.CreateBundleInstaller("BundleKv2");
21
22
- packageF.VerifyInstalled(false);
22
+ packageFv1.VerifyInstalled(false);
23
24
bundleKv1.Install();
25
bundleKv1.VerifyRegisteredAndInPackageCache();
26
27
- packageF.VerifyInstalled(true);
27
+ packageFv1.VerifyInstalled(true);
28
29
bundleKv2.Install();
30
bundleKv2.VerifyRegisteredAndInPackageCache();
31
bundleKv1.VerifyUnregisteredAndRemovedFromPackageCache();
32
33
- packageF.VerifyInstalled(true);
33
+ packageFv1.VerifyInstalled(true);
34
35
bundleKv2.VerifyPackageIsCached("PackageF");
36
37
bundleKv2.Uninstall();
38
bundleKv2.VerifyUnregisteredAndRemovedFromPackageCache();
39
40
- packageF.VerifyInstalled(false);
40
+ packageFv1.VerifyInstalled(false);
41
}
42
43
[Fact (Skip = "https://github.com/wixtoolset/issues/issues/6401")]
@@ -539,6 +539,152 @@ namespace WixToolsetTest.BurnE2E
539
}
540
}
541
542
+ [Fact(Skip = "https://github.com/wixtoolset/issues/issues/3421")]
543
+ public void DoesntLoseDependenciesOnFailedMajorUpgradeBundleFromMajorUpdateMsi()
544
+ {
545
+ var packageAv1 = this.CreatePackageInstaller("PackageAv1");
546
+ var packageC = this.CreatePackageInstaller("PackageC");
547
+ var packageFv1 = this.CreatePackageInstaller("PackageFv1");
548
+ var packageFv2 = this.CreatePackageInstaller("PackageFv2");
549
+ var packageGv1 = this.CreatePackageInstaller("PackageGv1");
550
+ var packageGv2 = this.CreatePackageInstaller("PackageGv2");
551
+ var bundleM = this.CreateBundleInstaller("BundleM");
552
+ var bundleNv1 = this.CreateBundleInstaller("BundleNv1");
553
+ var bundleNv2 = this.CreateBundleInstaller("BundleNv2");
554
+ var testBAController = this.CreateTestBAController();
555
+
556
+ packageAv1.VerifyInstalled(false);
557
+ packageC.VerifyInstalled(false);
558
+ packageFv1.VerifyInstalled(false);
559
+ packageFv2.VerifyInstalled(false);
560
+ packageGv1.VerifyInstalled(false);
561
+ packageGv2.VerifyInstalled(false);
562
+
563
+ bundleM.Install();
564
+ bundleM.VerifyRegisteredAndInPackageCache();
565
+
566
+ packageAv1.VerifyInstalled(true);
567
+ packageFv1.VerifyInstalled(true);
568
+ packageFv2.VerifyInstalled(false);
569
+ packageGv1.VerifyInstalled(false);
570
+ packageGv2.VerifyInstalled(false);
571
+
572
+ bundleNv1.Install();
573
+ bundleNv1.VerifyRegisteredAndInPackageCache();
574
+
575
+ packageAv1.VerifyInstalled(true);
576
+ packageFv1.VerifyInstalled(true);
577
+ packageFv2.VerifyInstalled(false);
578
+ packageGv1.VerifyInstalled(true);
579
+ packageGv2.VerifyInstalled(false);
580
+
581
+ // Make PackageC fail.
582
+ testBAController.SetPackageCancelExecuteAtProgress("PackageC", 10);
583
+
584
+ bundleNv2.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_USEREXIT);
585
+ bundleNv2.VerifyUnregisteredAndRemovedFromPackageCache();
586
+ bundleNv1.VerifyRegisteredAndInPackageCache();
587
+
588
+ packageAv1.VerifyInstalled(true);
589
+ packageC.VerifyInstalled(false);
590
+ packageFv1.VerifyInstalled(true);
591
+ packageFv2.VerifyInstalled(false);
592
+ packageGv1.VerifyInstalled(true);
593
+ packageGv2.VerifyInstalled(false);
594
+
595
+ bundleM.Uninstall();
596
+ bundleM.VerifyUnregisteredAndRemovedFromPackageCache();
597
+
598
+ packageAv1.VerifyInstalled(false);
599
+ packageFv1.VerifyInstalled(true);
600
+ packageFv2.VerifyInstalled(false);
601
+ packageGv1.VerifyInstalled(true);
602
+ packageGv2.VerifyInstalled(false);
603
+
604
+ bundleNv1.Uninstall();
605
+ bundleNv1.VerifyUnregisteredAndRemovedFromPackageCache();
606
+
607
+ packageAv1.VerifyInstalled(false);
608
+ packageFv1.VerifyInstalled(false);
609
+ packageFv2.VerifyInstalled(false);
610
+ packageGv1.VerifyInstalled(false);
611
+ packageGv2.VerifyInstalled(false);
612
+ }
613
+
614
+ [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6510")]
615
+ public void DoesntLoseDependenciesOnFailedMajorUpgradeBundleFromMinorUpdateMsi()
616
+ {
617
+ var packageAv1 = this.CreatePackageInstaller("PackageAv1");
618
+ var packageC = this.CreatePackageInstaller("PackageC");
619
+ var packageFv1 = this.CreatePackageInstaller("PackageFv1");
620
+ var packageFv101 = this.CreatePackageInstaller("PackageFv1_0_1");
621
+ var packageGv1 = this.CreatePackageInstaller("PackageGv1");
622
+ var packageGv101 = this.CreatePackageInstaller("PackageGv1_0_1");
623
+ var bundleM = this.CreateBundleInstaller("BundleM");
624
+ var bundleNv1 = this.CreateBundleInstaller("BundleNv1");
625
+ var bundleNv101 = this.CreateBundleInstaller("BundleNv1_0_1");
626
+ var testBAController = this.CreateTestBAController();
627
+
628
+ packageAv1.VerifyInstalled(false);
629
+ packageC.VerifyInstalled(false);
630
+ packageFv1.VerifyInstalledWithVersion(false);
631
+ packageFv101.VerifyInstalledWithVersion(false);
632
+ packageGv1.VerifyInstalledWithVersion(false);
633
+ packageGv101.VerifyInstalledWithVersion(false);
634
+
635
+ bundleM.Install();
636
+ bundleM.VerifyRegisteredAndInPackageCache();
637
+
638
+ packageAv1.VerifyInstalled(true);
639
+ packageFv1.VerifyInstalledWithVersion(true);
640
+ packageFv101.VerifyInstalledWithVersion(false);
641
+ packageGv1.VerifyInstalledWithVersion(false);
642
+ packageGv101.VerifyInstalledWithVersion(false);
643
+
644
+ bundleNv1.Install();
645
+ bundleNv1.VerifyRegisteredAndInPackageCache();
646
+
647
+ packageAv1.VerifyInstalled(true);
648
+ packageFv1.VerifyInstalledWithVersion(true);
649
+ packageFv101.VerifyInstalledWithVersion(false);
650
+ packageGv1.VerifyInstalledWithVersion(true);
651
+ packageGv101.VerifyInstalledWithVersion(false);
652
+
653
+ // Make PackageC fail.
654
+ testBAController.SetPackageCancelExecuteAtProgress("PackageC", 10);
655
+
656
+ // Verify https://github.com/wixtoolset/issues/issues/6510 - Dependency provider removed on rollback even though package is not rolled back
657
+ bundleNv101.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_USEREXIT);
658
+ bundleNv101.VerifyUnregisteredAndRemovedFromPackageCache();
659
+ bundleNv1.VerifyRegisteredAndInPackageCache();
660
+
661
+ // The expected values will change after implementing https://github.com/wixtoolset/issues/issues/6535 and https://github.com/wixtoolset/issues/issues/3421
662
+ packageAv1.VerifyInstalled(true);
663
+ packageC.VerifyInstalled(false);
664
+ packageFv1.VerifyInstalledWithVersion(false);
665
+ packageFv101.VerifyInstalledWithVersion(true);
666
+ packageGv1.VerifyInstalledWithVersion(false);
667
+ packageGv101.VerifyInstalledWithVersion(true);
668
+
669
+ bundleM.Uninstall();
670
+ bundleM.VerifyUnregisteredAndRemovedFromPackageCache();
671
+
672
+ packageAv1.VerifyInstalled(false);
673
+ packageFv1.VerifyInstalledWithVersion(false);
674
+ packageFv101.VerifyInstalledWithVersion(true);
675
+ packageGv1.VerifyInstalledWithVersion(false);
676
+ packageGv101.VerifyInstalledWithVersion(true);
677
+
678
+ bundleNv1.Uninstall();
679
+ bundleNv1.VerifyUnregisteredAndRemovedFromPackageCache();
680
+
681
+ packageAv1.VerifyInstalled(false);
682
+ packageFv1.VerifyInstalledWithVersion(false);
683
+ packageFv101.VerifyInstalledWithVersion(false);
684
+ packageGv1.VerifyInstalledWithVersion(false);
685
+ packageGv101.VerifyInstalledWithVersion(false);
686
+ }
687
+
688
[Fact]
689
public void DoesntRegisterDependencyOnPackageNotSelectedForInstall()
690
{
@@ -711,6 +857,49 @@ namespace WixToolsetTest.BurnE2E
857
bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe);
858
}
859
860
+ [Fact(Skip = "https://github.com/wixtoolset/issues/issues/3850")]
861
+ public void RemovesDependencyProviderFromUpgradedPackageDuringUninstall()
862
+ {
863
+ var packageC = this.CreatePackageInstaller("PackageC");
864
+ var packageFv1 = this.CreatePackageInstaller("PackageFv1");
865
+ var packageFv2 = this.CreatePackageInstaller("PackageFv2");
866
+ var packageGv1 = this.CreatePackageInstaller("PackageGv1");
867
+ var packageGv2 = this.CreatePackageInstaller("PackageGv2");
868
+ var bundleNv1 = this.CreateBundleInstaller("BundleNv1");
869
+ var bundleNv2 = this.CreateBundleInstaller("BundleNv2");
870
+
871
+ packageC.VerifyInstalled(false);
872
+ packageFv1.VerifyInstalled(false);
873
+ packageFv2.VerifyInstalled(false);
874
+ packageGv1.VerifyInstalled(false);
875
+ packageGv2.VerifyInstalled(false);
876
+
877
+ bundleNv1.Install();
878
+ bundleNv1.VerifyRegisteredAndInPackageCache();
879
+
880
+ packageC.VerifyInstalled(false);
881
+ packageFv1.VerifyInstalled(true);
882
+ packageFv2.VerifyInstalled(false);
883
+ packageGv1.VerifyInstalled(true);
884
+ packageGv2.VerifyInstalled(false);
885
+
886
+ // Verify https://github.com/wixtoolset/issues/issues/3850 - Dependency provider not removed on uninstall from upgrade
887
+ bundleNv2.Install();
888
+ bundleNv2.VerifyRegisteredAndInPackageCache();
889
+ bundleNv1.VerifyUnregisteredAndRemovedFromPackageCache();
890
+
891
+ packageC.VerifyInstalled(true);
892
+ packageFv1.VerifyInstalled(false);
893
+ packageFv2.VerifyInstalled(true);
894
+ packageGv1.VerifyInstalled(false);
895
+ packageGv2.VerifyInstalled(true);
896
+
897
+ bundleNv1.VerifyPackageIsCached("PackageF", false);
898
+ bundleNv1.VerifyPackageIsCached("PackageG", false);
899
+ bundleNv1.VerifyPackageProviderRemoved("PackageF");
900
+ bundleNv1.VerifyPackageProviderRemoved("PackageG");
901
+ }
902
+
903
[Fact]
904
public void SkipsCrossScopeDependencyRegistration()
905
{