aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2026-03-09 16:21:15 -0400
committerBob Arnson <github@bobs.org>2026-03-09 17:32:22 -0400
commitb4da272e25c5c776cc5c66ee069bd3fb7548dd92 (patch)
treec505aa7fcde1638b8b67bdb41db0b56f9930a246 /src/test
parentdd827742e060db17fb61acc1534556a821c1f2c2 (diff)
downloadwix-b4da272e25c5c776cc5c66ee069bd3fb7548dd92.tar.gz
wix-b4da272e25c5c776cc5c66ee069bd3fb7548dd92.tar.bz2
wix-b4da272e25c5c776cc5c66ee069bd3fb7548dd92.zip
Set more detect-phase values when falling back.
When configurable-scope bundle is already installed, find it during detect by falling back from machine to user. Set the scope as early as possible so detect-phase checks (e.g., cache path, state file) work as expected. Fixes https://github.com/wixtoolset/issues/issues/9257
Diffstat (limited to 'src/test')
-rw-r--r--src/test/burn/WixToolsetTest.BurnE2E/ConfigurableScopeTests.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/burn/WixToolsetTest.BurnE2E/ConfigurableScopeTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/ConfigurableScopeTests.cs
index 049cefc3..9e8870fc 100644
--- a/src/test/burn/WixToolsetTest.BurnE2E/ConfigurableScopeTests.cs
+++ b/src/test/burn/WixToolsetTest.BurnE2E/ConfigurableScopeTests.cs
@@ -108,7 +108,12 @@ namespace WixToolsetTest.BurnE2E
108 108
109 Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 3 packages, action: Install, planned scope: Default")); 109 Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 3 packages, action: Install, planned scope: Default"));
110 110
111 log = bundle.Modify();
112 Assert.True(LogVerifier.MessageInLogFile(log, "TESTBA: OnDetectBegin: Cached=True"));
113 Assert.False(LogVerifier.MessageInLogFile(log, "Could not load or read state file:"));
114
111 log = bundle.Repair(); 115 log = bundle.Repair();
116 Assert.False(LogVerifier.MessageInLogFile(log, "Could not load or read state file:"));
112 Assert.True(LogVerifier.MessageInLogFile(log, "Bundle was already installed with scope: PerUser. Scope cannot change during maintenance.")); 117 Assert.True(LogVerifier.MessageInLogFile(log, "Bundle was already installed with scope: PerUser. Scope cannot change during maintenance."));
113 118
114 var bundleV2 = this.CreateBundleInstaller("AllPuomBundleTestBAv2"); 119 var bundleV2 = this.CreateBundleInstaller("AllPuomBundleTestBAv2");
@@ -132,6 +137,8 @@ namespace WixToolsetTest.BurnE2E
132 Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 3 packages, action: Install, planned scope: Default")); 137 Assert.True(LogVerifier.MessageInLogFile(log, "Plan begin, 3 packages, action: Install, planned scope: Default"));
133 138
134 log = bundle.Repair(); 139 log = bundle.Repair();
140 Assert.True(LogVerifier.MessageInLogFile(log, "TESTBA: OnDetectBegin: Cached=True"));
141 Assert.False(LogVerifier.MessageInLogFile(log, "Could not load or read state file:"));
135 Assert.True(LogVerifier.MessageInLogFile(log, "Bundle was already installed with scope: PerUser. Scope cannot change during maintenance.")); 142 Assert.True(LogVerifier.MessageInLogFile(log, "Bundle was already installed with scope: PerUser. Scope cannot change during maintenance."));
136 143
137 var bundleV2 = this.CreateBundleInstaller("AllPuomBundleTestBAv2"); 144 var bundleV2 = this.CreateBundleInstaller("AllPuomBundleTestBAv2");
@@ -164,6 +171,8 @@ namespace WixToolsetTest.BurnE2E
164 Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,")); 171 Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PmouPkg2.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerMachine,"));
165 172
166 log = bundle.Repair(); 173 log = bundle.Repair();
174 Assert.True(LogVerifier.MessageInLogFile(log, "TESTBA: OnDetectBegin: Cached=True"));
175 Assert.False(LogVerifier.MessageInLogFile(log, "Could not load or read state file:"));
167 Assert.True(LogVerifier.MessageInLogFile(log, "Bundle was already installed with scope: PerMachine")); 176 Assert.True(LogVerifier.MessageInLogFile(log, "Bundle was already installed with scope: PerMachine"));
168 Assert.True(LogVerifier.MessageInLogFile(log, "Detected package: PmouPkg1.msi, state: Present, authored scope: PerMachineOrUser, detected scope: PerMachine,")); 177 Assert.True(LogVerifier.MessageInLogFile(log, "Detected package: PmouPkg1.msi, state: Present, authored scope: PerMachineOrUser, detected scope: PerMachine,"));
169 Assert.True(LogVerifier.MessageInLogFile(log, "Detected package: PmouPkg2.msi, state: Present, authored scope: PerMachineOrUser, detected scope: PerMachine,")); 178 Assert.True(LogVerifier.MessageInLogFile(log, "Detected package: PmouPkg2.msi, state: Present, authored scope: PerMachineOrUser, detected scope: PerMachine,"));
@@ -508,6 +517,8 @@ namespace WixToolsetTest.BurnE2E
508 Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerUserPkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser")); 517 Assert.True(LogVerifier.MessageInLogFile(log, "Planned package: PerUserPkg.msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, scope: PerUser"));
509 518
510 log = bundle.Repair(); 519 log = bundle.Repair();
520 Assert.True(LogVerifier.MessageInLogFile(log, "TESTBA: OnDetectBegin: Cached=True"));
521 Assert.False(LogVerifier.MessageInLogFile(log, "Could not load or read state file:"));
511 Assert.True(LogVerifier.MessageInLogFile(log, "Detected package: PerMachinePkg.msi, state: Present, authored scope: PerMachine, detected scope: PerMachine,")); 522 Assert.True(LogVerifier.MessageInLogFile(log, "Detected package: PerMachinePkg.msi, state: Present, authored scope: PerMachine, detected scope: PerMachine,"));
512 Assert.True(LogVerifier.MessageInLogFile(log, "Detected package: PmouPkg1.msi, state: Present, authored scope: PerMachineOrUser, detected scope: PerMachine,")); 523 Assert.True(LogVerifier.MessageInLogFile(log, "Detected package: PmouPkg1.msi, state: Present, authored scope: PerMachineOrUser, detected scope: PerMachine,"));
513 Assert.True(LogVerifier.MessageInLogFile(log, "Detected package: PmouPkg2.msi, state: Present, authored scope: PerMachineOrUser, detected scope: PerMachine,")); 524 Assert.True(LogVerifier.MessageInLogFile(log, "Detected package: PmouPkg2.msi, state: Present, authored scope: PerMachineOrUser, detected scope: PerMachine,"));