aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorBevan Weiss <bevan.weiss@gmail.com>2025-01-03 15:06:15 +1100
committerRob Mensching <rob@firegiant.com>2025-02-11 23:14:49 -0800
commit8f5130afdc60f4957086e41d62cfe9f8d70d5321 (patch)
treeda9f8a9d217eff1484bf78003d52624d1f91433b /src/test
parentfcae786168ee7c148ac932d725357f9714ad6631 (diff)
downloadwix-8f5130afdc60f4957086e41d62cfe9f8d70d5321.tar.gz
wix-8f5130afdc60f4957086e41d62cfe9f8d70d5321.tar.bz2
wix-8f5130afdc60f4957086e41d62cfe9f8d70d5321.zip
Fix ups for Domain Group creation / removal.
Signed-off-by: Bevan Weiss <bevan.weiss@gmail.com>
Diffstat (limited to 'src/test')
-rw-r--r--src/test/burn/WixTestTools/RuntimeFactAttribute.cs4
-rw-r--r--src/test/msi/WixToolsetTest.MsiE2E/UtilExtensionGroupTests.cs6
2 files changed, 6 insertions, 4 deletions
diff --git a/src/test/burn/WixTestTools/RuntimeFactAttribute.cs b/src/test/burn/WixTestTools/RuntimeFactAttribute.cs
index d7f56f70..2644a1cc 100644
--- a/src/test/burn/WixTestTools/RuntimeFactAttribute.cs
+++ b/src/test/burn/WixTestTools/RuntimeFactAttribute.cs
@@ -47,6 +47,8 @@ namespace WixTestTools
47 47
48 var domainTestsEnabledString = Environment.GetEnvironmentVariable(RequiredDomainEnvironmentVariableName); 48 var domainTestsEnabledString = Environment.GetEnvironmentVariable(RequiredDomainEnvironmentVariableName);
49 RuntimeDomainTestsEnabled = Boolean.TryParse(domainTestsEnabledString, out var domainTestsEnabled) && domainTestsEnabled; 49 RuntimeDomainTestsEnabled = Boolean.TryParse(domainTestsEnabledString, out var domainTestsEnabled) && domainTestsEnabled;
50
51 RunningOnWindowsServer = IsWindowsServer();
50 } 52 }
51 53
52 public bool DomainRequired 54 public bool DomainRequired
@@ -63,8 +65,6 @@ namespace WixTestTools
63 this.Skip = $"These tests require the test host to be running as a domain member ({(RunningInDomain ? "passed" : "failed")}). These tests affect both MACHINE AND DOMAIN state. To accept the consequences, set the {RequiredDomainEnvironmentVariableName} environment variable to true ({(RuntimeDomainTestsEnabled ? "passed" : "failed")})."; 65 this.Skip = $"These tests require the test host to be running as a domain member ({(RunningInDomain ? "passed" : "failed")}). These tests affect both MACHINE AND DOMAIN state. To accept the consequences, set the {RequiredDomainEnvironmentVariableName} environment variable to true ({(RuntimeDomainTestsEnabled ? "passed" : "failed")}).";
64 } 66 }
65 } 67 }
66
67 RunningOnWindowsServer = IsWindowsServer();
68 } 68 }
69 69
70 private bool _RequireWindowsServer; 70 private bool _RequireWindowsServer;
diff --git a/src/test/msi/WixToolsetTest.MsiE2E/UtilExtensionGroupTests.cs b/src/test/msi/WixToolsetTest.MsiE2E/UtilExtensionGroupTests.cs
index cee357a6..e379047d 100644
--- a/src/test/msi/WixToolsetTest.MsiE2E/UtilExtensionGroupTests.cs
+++ b/src/test/msi/WixToolsetTest.MsiE2E/UtilExtensionGroupTests.cs
@@ -151,12 +151,14 @@ namespace WixToolsetTest.MsiE2E
151 [RuntimeFact] 151 [RuntimeFact]
152 public void FailsIfRestrictedDomain() 152 public void FailsIfRestrictedDomain()
153 { 153 {
154 var testDomain = "DOESNOTEXIST";
155 var testGroup = "testName1";
154 var productRestrictedDomain = this.CreatePackageInstaller("ProductRestrictedDomain"); 156 var productRestrictedDomain = this.CreatePackageInstaller("ProductRestrictedDomain");
155 157
156 string logFile = productRestrictedDomain.InstallProduct(MSIExec.MSIExecReturnCode.ERROR_INSTALL_FAILURE, "TESTDOMAIN=DOESNOTEXIST"); 158 string logFile = productRestrictedDomain.InstallProduct(MSIExec.MSIExecReturnCode.ERROR_INSTALL_FAILURE, $"TESTDOMAIN={testDomain}");
157 159
158 // Verify expected error message in the log file 160 // Verify expected error message in the log file
159 Assert.True(LogVerifier.MessageInLogFile(logFile, "CreateGroup: Error 0x8007054b: failed to find Domain DOESNOTEXIST.")); 161 Assert.True(LogVerifier.MessageInLogFile(logFile, $"ConfigureGroups: Error 0x8007054b: Domain does not exist for vital group: {testDomain}\\{testGroup} - aborting"));
160 } 162 }
161 163
162 // Verify that a group can be created with a group comment 164 // Verify that a group can be created with a group comment