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

Function TestSQLiteIPList_ReadItems

internal/iplibrary/ip_list_sqlite_test.go:61–80  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

59}
60
61func TestSQLiteIPList_ReadItems(t *testing.T) {
62 db, err := iplibrary.NewSQLiteIPList()
63 if err != nil {
64 t.Fatal(err)
65 }
66 defer func() {
67 _ = db.Close()
68 }()
69
70 defer func() {
71 _ = db.Close()
72 }()
73
74 items, goNext, err := db.ReadItems(0, 2)
75 if err != nil {
76 t.Fatal(err)
77 }
78 t.Log("goNext:", goNext)
79 logs.PrintAsJSON(items, t)
80}
81
82func TestSQLiteIPList_ReadMaxVersion(t *testing.T) {
83 db, err := iplibrary.NewSQLiteIPList()

Callers

nothing calls this directly

Calls 4

CloseMethod · 0.95
ReadItemsMethod · 0.95
NewSQLiteIPListFunction · 0.92
LogMethod · 0.80

Tested by

no test coverage detected