Skip to content

Commit a8bf953

Browse files
committed
Fix the scenario test
1 parent 8a89f6e commit a8bf953

File tree

5 files changed

+2144
-2030
lines changed

5 files changed

+2144
-2030
lines changed

src/Network/Network.Test/ScenarioTests/AzureFirewallFqdnTagTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public AzureFirewallFqdnTagTests(ITestOutputHelper output)
2727
{
2828
}
2929

30-
[Fact(Skip = "")]
30+
[Fact(Skip = "skip")]
3131
[Trait(Category.AcceptanceType, Category.CheckIn)]
3232
[Trait(Category.Owner, NrpTeamAlias.azurefirewall)]
3333
public void TestListAzureFirewallFqdnTag()

src/Network/Network.Test/ScenarioTests/AzureFirewallPolicyTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public AzureFirewallPolicyTests(ITestOutputHelper output)
2626
{
2727
}
2828

29-
[Fact(Skip = "")]
29+
[Fact(Skip = "skip")]
3030
[Trait(Category.AcceptanceType, Category.CheckIn)]
3131
[Trait(Category.Owner, NrpTeamAlias.azurefirewall)]
3232
public void TestAzureFirewallPolicyCRUD()

src/Network/Network.Test/ScenarioTests/AzureFirewallTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,23 @@ public void TestAzureFirewallCRUDWithZones()
4242
TestRunner.RunTestScript("Test-AzureFirewallCRUDWithZones");
4343
}
4444

45-
[Fact(Skip ="")]
45+
[Fact(Skip ="skip")]
4646
[Trait(Category.AcceptanceType, Category.CheckIn)]
4747
[Trait(Category.Owner, NrpTeamAlias.azurefirewall)]
4848
public void TestAzureFirewallPIPAndVNETObjectTypeParams()
4949
{
5050
TestRunner.RunTestScript("Test-AzureFirewallPIPAndVNETObjectTypeParams");
5151
}
5252

53-
[Fact(Skip = "")]
53+
[Fact(Skip = "skip")]
5454
[Trait(Category.AcceptanceType, Category.CheckIn)]
5555
[Trait(Category.Owner, NrpTeamAlias.azurefirewall)]
5656
public void TestAzureFirewallAllocateAndDeallocate()
5757
{
5858
TestRunner.RunTestScript("Test-AzureFirewallAllocateAndDeallocate");
5959
}
6060

61-
[Fact(Skip = "")]
61+
[Fact(Skip = "skip")]
6262
[Trait(Category.AcceptanceType, Category.CheckIn)]
6363
[Trait(Category.Owner, NrpTeamAlias.azurefirewall)]
6464
public void TestAzureFirewallVirtualHubCRUD()

src/Network/Network.Test/ScenarioTests/AzureFirewallTests.ps1

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,15 @@ function Test-AzureFirewallCRUD {
108108
$natRule1TranslatedPort = "91"
109109

110110
# AzureFirewallNatRule 2
111-
$natRule1Name = "natRule2"
112-
$natRule1Desc = "desc2"
113-
$natRule1SourceAddress1 = "10.0.0.0"
114-
$natRule1SourceAddress2 = "111.1.0.0/24"
115-
$natRule1DestinationAddress1 = "1.2.3.4"
116-
$natRule1Protocol1 = "UDP"
117-
$natRule1Protocol2 = "TCP"
118-
$natRule1DestinationPort1 = "95"
119-
$natRule1TranslatedFqdn = "server1.internal.com"
120-
$natRule1TranslatedPort = "96"
111+
$natRule2Name = "natRule2"
112+
$natRule2Desc = "desc2"
113+
$natRule2SourceAddress1 = "10.0.0.0"
114+
$natRule2SourceAddress2 = "111.1.0.0/24"
115+
$natRule2Protocol1 = "UDP"
116+
$natRule2Protocol2 = "TCP"
117+
$natRule2DestinationPort1 = "95"
118+
$natRule2TranslatedFqdn = "server1.internal.com"
119+
$natRule2TranslatedPort = "96"
121120

122121
try {
123122
# Create the resource group
@@ -241,7 +240,7 @@ function Test-AzureFirewallCRUD {
241240
$natRc = New-AzFirewallNatRuleCollection -Name $natRcName -Priority $natRcPriority -Rule $natRule
242241

243242
# Add second NAT Rule to rule Collection
244-
$natRc.AddRule($$natRule2)
243+
$natRc.AddRule($natRule2)
245244

246245
# Add ApplicationRuleCollections to the Firewall using method AddApplicationRuleCollection
247246
$azureFirewall.AddApplicationRuleCollection($appRc)
@@ -450,8 +449,8 @@ function Test-AzureFirewallCRUD {
450449
Assert-AreEqual $networkRule2SourceAddress1 $networkRule2.SourceAddresses[0]
451450
Assert-AreEqual $networkRule2SourceAddress2 $networkRule2.SourceAddresses[1]
452451

453-
Assert-AreEqual 1 $networkRule2.DestinationAddresses.Count
454-
Assert-AreEqual $networkRule2DestinationAddress1 $networkRule2.DestinationAddresses[0]
452+
Assert-AreEqual 1 $networkRule2.DestinationFqdns.Count
453+
Assert-AreEqual $networkRule2DestinationFqdn1 $networkRule2.DestinationFqdns[0]
455454

456455
Assert-AreEqual 3 $networkRule2.Protocols.Count
457456
Assert-AreEqual $networkRule2Protocol1 $networkRule2.Protocols[0]
@@ -528,11 +527,6 @@ function Test-AzureFirewallCRUDWithZones {
528527
$networkRcPriority = 200
529528
$networkRcActionType = "Deny"
530529

531-
# AzureFirewallNetworkRuleCollection2
532-
$networkRcName2 = "networkRc2"
533-
$networkRcPriority2 = 300
534-
$networkRcActionType = "Deny"
535-
536530
# AzureFirewallNetworkRule 1
537531
$networkRule1Name = "networkRule"
538532
$networkRule1Desc = "desc1"
@@ -560,18 +554,6 @@ function Test-AzureFirewallCRUDWithZones {
560554
$natRule1TranslatedAddress = "10.1.2.3"
561555
$natRule1TranslatedPort = "91"
562556

563-
# AzureFirewallNatRule 2
564-
$natRule2Name = "natRule2"
565-
$natRule2Desc = "desc2"
566-
$natRule2SourceAddress1 = "10.0.0.0"
567-
$natRule2SourceAddress2 = "111.1.0.0/24"
568-
$natRule2DestinationAddress1 = "1.2.3.4"
569-
$natRule2Protocol1 = "UDP"
570-
$natRule2Protocol2 = "TCP"
571-
$natRule2DestinationPort1 = "9001"
572-
$natRule2TranslatedFqdn = "httpserver.internal.com"
573-
$natRule2TranslatedPort = "9001"
574-
575557
try {
576558
# Create the resource group
577559
$resourceGroup = New-AzResourceGroup -Name $rgname -Location $location -Tags @{ testtag = "testval" }

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.AzureFirewallTests/TestAzureFirewallCRUD.json

Lines changed: 2127 additions & 1995 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)