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

Function TestSet_AddElement

internal/firewalls/nftables/set_test.go:35–42  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

33}
34
35func TestSet_AddElement(t *testing.T) {
36 var set = getIPv4Set(t)
37 err := set.AddElement(net.ParseIP("192.168.2.31").To4(), &nftables.ElementOptions{Timeout: 86400 * time.Second}, false)
38 if err != nil {
39 t.Fatal(err)
40 }
41 t.Log("ok")
42}
43
44func TestSet_DeleteElement(t *testing.T) {
45 var set = getIPv4Set(t)

Callers

nothing calls this directly

Calls 4

getIPv4SetFunction · 0.85
ParseIPMethod · 0.80
LogMethod · 0.80
AddElementMethod · 0.45

Tested by

no test coverage detected