diff options
Diffstat (limited to 'src/test/burn/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs')
-rw-r--r-- | src/test/burn/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs new file mode 100644 index 00000000..6539db34 --- /dev/null +++ b/src/test/burn/WixToolsetTest.BurnE2E/RollbackBoundaryTests.cs | |||
@@ -0,0 +1,52 @@ | |||
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 | namespace WixToolsetTest.BurnE2E | ||
4 | { | ||
5 | using System; | ||
6 | using System.IO; | ||
7 | using Xunit; | ||
8 | using Xunit.Abstractions; | ||
9 | |||
10 | public class RollbackBoundaryTests : BurnE2ETests | ||
11 | { | ||
12 | public RollbackBoundaryTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } | ||
13 | |||
14 | /// <summary> | ||
15 | /// Installs 1 bundle: | ||
16 | /// chain - non-vital rollback boundary, package F, package A, vital rollback boundary, package B | ||
17 | /// package F fails | ||
18 | /// package A and B are permanent | ||
19 | /// Execution is supposed to be: | ||
20 | /// package F (fails) | ||
21 | /// rollback to non-vital rollback boundary which ignores the error and skips over package A | ||
22 | /// install package B | ||
23 | /// unregister since no non-permanent packages should be installed or cached. | ||
24 | /// </summary> | ||
25 | [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6309")] | ||
26 | public void NonVitalRollbackBoundarySkipsToNextRollbackBoundary() | ||
27 | { | ||
28 | var packageA = this.CreatePackageInstaller("PackageA"); | ||
29 | var packageB = this.CreatePackageInstaller("PackageB"); | ||
30 | this.CreatePackageInstaller("PackageC"); | ||
31 | this.CreatePackageInstaller("PackageF"); | ||
32 | |||
33 | var bundleA = this.CreateBundleInstaller("BundleA"); | ||
34 | |||
35 | var packageASourceCodeInstalled = packageA.GetInstalledFilePath("Package.wxs"); | ||
36 | var packageBSourceCodeInstalled = packageB.GetInstalledFilePath("Package.wxs"); | ||
37 | |||
38 | // Source file should *not* be installed | ||
39 | Assert.False(File.Exists(packageASourceCodeInstalled), $"Package A payload should not be there on test start: {packageASourceCodeInstalled}"); | ||
40 | Assert.False(File.Exists(packageBSourceCodeInstalled), $"Package B payload should not be there on test start: {packageBSourceCodeInstalled}"); | ||
41 | |||
42 | bundleA.Install(); | ||
43 | |||
44 | // No non-permanent packages should have ended up installed or cached so it should have unregistered. | ||
45 | bundleA.VerifyUnregisteredAndRemovedFromPackageCache(); | ||
46 | |||
47 | // Only PackageB source file should be installed | ||
48 | Assert.True(File.Exists(packageBSourceCodeInstalled), String.Concat("Should have found Package B payload installed at: ", packageBSourceCodeInstalled)); | ||
49 | Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Should not have found Package A payload installed at: ", packageASourceCodeInstalled)); | ||
50 | } | ||
51 | } | ||
52 | } | ||