Skip to content

Commit

Permalink
chore: update test files
Browse files Browse the repository at this point in the history
  • Loading branch information
mjholub committed Feb 16, 2024
1 parent df060bc commit 1e3620c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions daemon/firewall/nftables/monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ func addInterceptionRules(nft *nftb.Nft, t *testing.T) {
return
}

if err, _ := nft.QueueDNSResponses(common.EnableRule, common.EnableRule); err != nil {
if err := nft.QueueDNSResponses(common.EnableRule, common.EnableRule); err != nil {
t.Errorf("Error while running DNS nftables rule: %s", err)
}
if err, _ := nft.QueueConnections(common.EnableRule, common.EnableRule); err != nil {
if err := nft.QueueConnections(common.EnableRule, common.EnableRule); err != nil {
t.Errorf("Error while running conntrack nftables rule: %s", err)
}
}
Expand Down
4 changes: 2 additions & 2 deletions daemon/firewall/nftables/rules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ func TestQueueConnections(t *testing.T) {
t.Error("pre step add_chain() output-mangle-inet failed")
}

if err1, err2 := nftest.Fw.QueueConnections(true, true); err1 != nil && err2 != nil {
t.Errorf("rule to queue connections not added: %s, %s", err1, err2)
if err := nftest.Fw.QueueConnections(true, true); err != nil {
t.Errorf("rule to queue connections not added: %v", err.AsError())
}

r, _ := getRule(t, conn, exprs.NFT_CHAIN_MANGLE, exprs.NFT_HOOK_OUTPUT, nftb.InterceptionRuleKey, 0)
Expand Down

0 comments on commit 1e3620c

Please sign in to comment.