Add test for checking rule TableFamily

This commit is contained in:
psondej 2024-12-11 18:26:22 +01:00
parent f16c6a6517
commit 6904ccab40
1 changed files with 3 additions and 0 deletions

View File

@ -156,6 +156,9 @@ func TestMonitor(t *testing.T) {
*gotChain.Hooknum != *postrouting.Hooknum {
t.Fatal("no want chain", gotChain.Type, gotChain.Name, gotChain.Hooknum)
}
if gotRule.Table.Family != nat.Family {
t.Fatal("rule wrong family", gotRule.Table.Family, gotRule.Table.Name)
}
if len(gotRule.Exprs) != len(rule.Exprs) {
t.Fatal("no want rule")
}