Skip to content

Commit eeffb5a

Browse files
committed
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>
1 parent 523c66a commit eeffb5a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/test/burn/WixTestTools/Firewall/UniqueCheck.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public UniqueCheck(RuleDetails details)
2323
this.ApplicationName = details.ApplicationName;
2424
this.LocalUserOwner = details.LocalUserOwner;
2525
this.RemoteAddresses = details.RemoteAddresses;
26+
this.Grouping = details.Grouping;
2627
}
2728

2829

@@ -40,6 +41,8 @@ public UniqueCheck(RuleDetails details)
4041

4142
public string RemoteAddresses { get; set; }
4243

44+
public string Grouping { get; set; }
45+
4346
public bool FirewallRuleIsUnique(INetFwRule3 rule)
4447
{
4548
if (this.Name != null && rule.Name != this.Name)
@@ -77,6 +80,11 @@ public bool FirewallRuleIsUnique(INetFwRule3 rule)
7780
return false;
7881
}
7982

83+
if (this.Grouping != null && rule.Grouping != this.Grouping)
84+
{
85+
return false;
86+
}
87+
8088
return true;
8189
}
8290
}

0 commit comments

Comments
 (0)