Compare commits

..

2 Commits

Author SHA1 Message Date
patryk4815 5ee2016d61
Merge 6904ccab40 into c96bb6363f 2024-12-11 17:26:31 +00:00
psondej 6904ccab40 Add test for checking rule TableFamily 2024-12-11 18:26:22 +01:00
1 changed files with 3 additions and 0 deletions

View File

@ -156,6 +156,9 @@ func TestMonitor(t *testing.T) {
*gotChain.Hooknum != *postrouting.Hooknum { *gotChain.Hooknum != *postrouting.Hooknum {
t.Fatal("no want chain", gotChain.Type, gotChain.Name, gotChain.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) { if len(gotRule.Exprs) != len(rule.Exprs) {
t.Fatal("no want rule") t.Fatal("no want rule")
} }