diff options
author | Bevan Weiss <bevan.weiss@gmail.com> | 2025-01-01 15:41:46 +1100 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2025-02-11 14:57:26 -0800 |
commit | cfb2df2e88b9ee273852124bbbdb1342207e96f9 (patch) | |
tree | 5751b16031bf95b21edb04a0f3b5575f84fafc22 /src | |
parent | c49432f7d39dfe7fedc722b85cd1162bd5096ac1 (diff) | |
download | wix-cfb2df2e88b9ee273852124bbbdb1342207e96f9.tar.gz wix-cfb2df2e88b9ee273852124bbbdb1342207e96f9.tar.bz2 wix-cfb2df2e88b9ee273852124bbbdb1342207e96f9.zip |
Failures were seen in MSI Unit Tests around Firewall rules within
Windows Sandbox.
This is potentially a Windows OS bug (it was from a Windows Insider build),
however shows that it's possible in the Firewall API to have multiple rules
which differ only in their Grouping.
So the testbench should consider different Grouping as making for a unique
firewall rule.
Signed-off-by: Bevan Weiss <bevan.weiss@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/test/burn/WixTestTools/Firewall/UniqueCheck.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/burn/WixTestTools/Firewall/UniqueCheck.cs b/src/test/burn/WixTestTools/Firewall/UniqueCheck.cs index 598350f9..7bc2e527 100644 --- a/src/test/burn/WixTestTools/Firewall/UniqueCheck.cs +++ b/src/test/burn/WixTestTools/Firewall/UniqueCheck.cs | |||
@@ -23,6 +23,7 @@ namespace WixTestTools.Firewall | |||
23 | this.ApplicationName = details.ApplicationName; | 23 | this.ApplicationName = details.ApplicationName; |
24 | this.LocalUserOwner = details.LocalUserOwner; | 24 | this.LocalUserOwner = details.LocalUserOwner; |
25 | this.RemoteAddresses = details.RemoteAddresses; | 25 | this.RemoteAddresses = details.RemoteAddresses; |
26 | this.Grouping = details.Grouping; | ||
26 | } | 27 | } |
27 | 28 | ||
28 | 29 | ||
@@ -40,6 +41,8 @@ namespace WixTestTools.Firewall | |||
40 | 41 | ||
41 | public string RemoteAddresses { get; set; } | 42 | public string RemoteAddresses { get; set; } |
42 | 43 | ||
44 | public string Grouping { get; set; } | ||
45 | |||
43 | public bool FirewallRuleIsUnique(INetFwRule3 rule) | 46 | public bool FirewallRuleIsUnique(INetFwRule3 rule) |
44 | { | 47 | { |
45 | if (this.Name != null && rule.Name != this.Name) | 48 | if (this.Name != null && rule.Name != this.Name) |
@@ -77,6 +80,11 @@ namespace WixTestTools.Firewall | |||
77 | return false; | 80 | return false; |
78 | } | 81 | } |
79 | 82 | ||
83 | if (this.Grouping != null && rule.Grouping != this.Grouping) | ||
84 | { | ||
85 | return false; | ||
86 | } | ||
87 | |||
80 | return true; | 88 | return true; |
81 | } | 89 | } |
82 | } | 90 | } |