Skip to content

Commit

Permalink
Update IptablesLibraryTest.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
splitice committed Jan 1, 2024
1 parent 727dd07 commit 5996e07
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions IPTables.Net.Tests/IptablesLibraryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,14 @@ public void TestRuleAdd()
}
var rule = IpTablesRule.Parse("-A test2 -p 80 -j ACCEPT", system, chain);
client.StartTransaction();
client.AddRule(rule);
client.EndTransactionCommit();

try
{
client.AddRule(rule);
}
finally
{
client.EndTransactionCommit();
}

var proc = Process.Start(new ProcessStartInfo("/sbin/" + GetBinary(), "-L test2"){RedirectStandardOutput = true, UseShellExecute = false});
proc.WaitForExit();
Expand Down

0 comments on commit 5996e07

Please sign in to comment.