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

Function TestKVIPList_UpdateMaxVersion

internal/iplibrary/ip_list_kv_test.go:128–149  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

126}
127
128func TestKVIPList_UpdateMaxVersion(t *testing.T) {
129 kv, err := iplibrary.NewKVIPList()
130 if err != nil {
131 t.Fatal(err)
132 }
133
134 defer func() {
135 _ = kv.Flush()
136 }()
137
138 err = kv.UpdateMaxVersion(101)
139 if err != nil {
140 t.Fatal(err)
141 }
142
143 maxVersion, err := kv.ReadMaxVersion()
144 if err != nil {
145 t.Fatal(err)
146 }
147
148 t.Log("version:", maxVersion)
149}
150
151func TestKVIPList_ReadMaxVersion(t *testing.T) {
152 kv, err := iplibrary.NewKVIPList()

Callers

nothing calls this directly

Calls 5

FlushMethod · 0.95
UpdateMaxVersionMethod · 0.95
ReadMaxVersionMethod · 0.95
NewKVIPListFunction · 0.92
LogMethod · 0.80

Tested by

no test coverage detected