MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / TestStringStructure_Exists

Function TestStringStructure_Exists

structure/string_test.go:285–299  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

283}
284
285func TestStringStructure_Exists(t *testing.T) {
286 str, _ := initdb()
287 defer str.db.Clean()
288
289 err = str.Set("1", []byte("1"), 0)
290 assert.Nil(t, err)
291
292 ok1, err := str.Exists("1")
293 assert.Nil(t, err)
294 assert.Equal(t, ok1, true)
295
296 ok2, err := str.Exists("1")
297 assert.Nil(t, err)
298 assert.Equal(t, ok2, true)
299}
300
301func TestStringStructure_Expire(t *testing.T) {
302 str, _ := initdb()

Callers

nothing calls this directly

Calls 4

initdbFunction · 0.85
SetMethod · 0.65
ExistsMethod · 0.65
CleanMethod · 0.45

Tested by

no test coverage detected