Skip to content

Commit 3a21026

Browse files
Fix packet capture test
1 parent caffa9d commit 3a21026

File tree

2 files changed

+2524
-1813
lines changed

2 files changed

+2524
-1813
lines changed

src/Network/Network.Test/ScenarioTests/NetworkWatcherAPITests.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,8 @@ function Test-PacketCapture
505505
Assert-AreEqual $pc1.Filters[0].RemoteIPAddress 127.0.0.1-127.0.0.255
506506
Assert-AreEqual $pc1.Filters[1].LocalIPAddress 127.0.0.1;127.0.0.5
507507
Assert-AreEqual $pc1.StorageLocation.FilePath C:\tmp\Capture.cap
508-
Assert-AreEqual $pcList.Count 2
508+
509+
$currentCount = $pcList.Count;
509510

510511
#Stop packet capture
511512
$job = Stop-AzNetworkWatcherPacketCapture -NetworkWatcher $nw -PacketCaptureName $pcName1 -AsJob
@@ -520,7 +521,7 @@ function Test-PacketCapture
520521

521522
#List packet captures
522523
$pcList = Get-AzNetworkWatcherPacketCapture -NetworkWatcher $nw
523-
Assert-AreEqual $pcList.Count 1
524+
Assert-AreEqual $pcList.Count ($currentCount - 1)
524525

525526
#Remove packet capture
526527
Remove-AzNetworkWatcherPacketCapture -NetworkWatcher $nw -PacketCaptureName $pcName2

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.NetworkWatcherAPITests/TestPacketCapture.json

Lines changed: 2521 additions & 1811 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)