aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2020-12-31 20:30:27 -0600
committerSean Hall <r.sean.hall@gmail.com>2021-01-03 16:20:17 -0600
commitd45c8da71cd9eecdbb314d04754f4316cadeba6f (patch)
tree466beec70bad762839b6fdb9bb3070f23adf8316 /src
parent7b37f41230ca1e5e4a81b834d320831de93616a9 (diff)
downloadwix-d45c8da71cd9eecdbb314d04754f4316cadeba6f.tar.gz
wix-d45c8da71cd9eecdbb314d04754f4316cadeba6f.tar.bz2
wix-d45c8da71cd9eecdbb314d04754f4316cadeba6f.zip
Verify MSI transactions are registered and cached appropriately.
Diffstat (limited to 'src')
-rw-r--r--src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs b/src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs
index 3c9261a7..53ed1fd2 100644
--- a/src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs
+++ b/src/WixToolsetTest.BurnE2E/MsiTransactionTests.cs
@@ -41,6 +41,8 @@ namespace WixToolsetTest.BurnE2E
41 41
42 bundleAv1.Install(); 42 bundleAv1.Install();
43 43
44 var bundleAv1CachedPath = bundleAv1.VerifyRegisteredAndInPackageCache();
45
44 // Source file should be installed 46 // Source file should be installed
45 Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled)); 47 Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled));
46 Assert.True(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Should have found Package Bv1 payload installed at: ", packageBv1SourceCodeInstalled)); 48 Assert.True(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Should have found Package Bv1 payload installed at: ", packageBv1SourceCodeInstalled));
@@ -48,6 +50,8 @@ namespace WixToolsetTest.BurnE2E
48 50
49 bundleAv2.Install(); 51 bundleAv2.Install();
50 52
53 var bundleAv2CachedPath = bundleAv2.VerifyRegisteredAndInPackageCache();
54
51 // Source file should be upgraded 55 // Source file should be upgraded
52 Assert.True(File.Exists(packageDSourceCodeInstalled), String.Concat("Should have found Package D payload installed at: ", packageDSourceCodeInstalled)); 56 Assert.True(File.Exists(packageDSourceCodeInstalled), String.Concat("Should have found Package D payload installed at: ", packageDSourceCodeInstalled));
53 Assert.True(File.Exists(packageBv2SourceCodeInstalled), String.Concat("Should have found Package Bv2 payload installed at: ", packageBv2SourceCodeInstalled)); 57 Assert.True(File.Exists(packageBv2SourceCodeInstalled), String.Concat("Should have found Package Bv2 payload installed at: ", packageBv2SourceCodeInstalled));
@@ -56,6 +60,8 @@ namespace WixToolsetTest.BurnE2E
56 Assert.False(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Package Bv1 payload should have been removed by upgrade uninstall from: ", packageBv1SourceCodeInstalled)); 60 Assert.False(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Package Bv1 payload should have been removed by upgrade uninstall from: ", packageBv1SourceCodeInstalled));
57 Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A payload should have been removed by upgrade uninstall from: ", packageASourceCodeInstalled)); 61 Assert.False(File.Exists(packageASourceCodeInstalled), String.Concat("Package A payload should have been removed by upgrade uninstall from: ", packageASourceCodeInstalled));
58 62
63 bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache(bundleAv1CachedPath);
64
59 // Uninstall everything. 65 // Uninstall everything.
60 bundleAv2.Uninstall(); 66 bundleAv2.Uninstall();
61 67
@@ -63,6 +69,8 @@ namespace WixToolsetTest.BurnE2E
63 Assert.False(File.Exists(packageDSourceCodeInstalled), String.Concat("Package D payload should have been removed by uninstall from: ", packageDSourceCodeInstalled)); 69 Assert.False(File.Exists(packageDSourceCodeInstalled), String.Concat("Package D payload should have been removed by uninstall from: ", packageDSourceCodeInstalled));
64 Assert.False(File.Exists(packageBv2SourceCodeInstalled), String.Concat("Package Bv2 payload should have been removed by uninstall from: ", packageBv2SourceCodeInstalled)); 70 Assert.False(File.Exists(packageBv2SourceCodeInstalled), String.Concat("Package Bv2 payload should have been removed by uninstall from: ", packageBv2SourceCodeInstalled));
65 Assert.False(File.Exists(packageCv2SourceCodeInstalled), String.Concat("Package Cv2 payload should have been removed by uninstall from: ", packageCv2SourceCodeInstalled)); 71 Assert.False(File.Exists(packageCv2SourceCodeInstalled), String.Concat("Package Cv2 payload should have been removed by uninstall from: ", packageCv2SourceCodeInstalled));
72
73 bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache(bundleAv2CachedPath);
66 } 74 }
67 75
68 /// <summary> 76 /// <summary>
@@ -95,11 +103,19 @@ namespace WixToolsetTest.BurnE2E
95 103
96 bundleBv1.Install(); 104 bundleBv1.Install();
97 105
106 bundleBv1.VerifyRegisteredAndInPackageCache();
107
98 // Source file should be installed 108 // Source file should be installed
99 Assert.True(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Should have found Package Bv1 payload installed at: ", packageBv1SourceCodeInstalled)); 109 Assert.True(File.Exists(packageBv1SourceCodeInstalled), String.Concat("Should have found Package Bv1 payload installed at: ", packageBv1SourceCodeInstalled));
100 110
101 bundleBv2.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_FAILURE); 111 bundleBv2.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_FAILURE);
102 112
113 // Bundle v2 should be registered since it installed a non-permanent package.
114 bundleBv2.VerifyRegisteredAndInPackageCache();
115
116 // Bundle v1 should not have been removed since the install of v2 failed in the middle of the chain.
117 bundleBv1.VerifyRegisteredAndInPackageCache();
118
103 // Source file should be installed 119 // Source file should be installed
104 Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled)); 120 Assert.True(File.Exists(packageASourceCodeInstalled), String.Concat("Should have found Package A payload installed at: ", packageASourceCodeInstalled));
105 121