MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / TestChain_GetRules

Function TestChain_GetRules

internal/firewalls/nftables/chain_test.go:97–107  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

95}
96
97func TestChain_GetRules(t *testing.T) {
98 var chain = getIPv4Chain(t)
99 rules, err := chain.GetRules()
100 if err != nil {
101 t.Fatal(err)
102 }
103 for _, rule := range rules {
104 t.Log("handle:", rule.Handle(), "set name:", rule.LookupSetName(),
105 "verdict:", rule.VerDict(), "user data:", string(rule.UserData()))
106 }
107}
108
109func TestChain_DeleteRule(t *testing.T) {
110 var chain = getIPv4Chain(t)

Callers

nothing calls this directly

Calls 7

getIPv4ChainFunction · 0.85
GetRulesMethod · 0.80
LogMethod · 0.80
HandleMethod · 0.80
LookupSetNameMethod · 0.80
VerDictMethod · 0.80
UserDataMethod · 0.80

Tested by

no test coverage detected