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

Function TestWal_ReadLast

lib/wal/wal_test.go:49–60  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

47}
48
49func TestWal_ReadLast(t *testing.T) {
50 wal, err := New()
51 assert.Nil(t, err)
52
53 data := []byte("test data")
54 err = wal.Write(data)
55 assert.Nil(t, err)
56
57 readData, err := wal.ReadLast()
58 assert.Nil(t, err)
59 assert.Equal(t, data, readData)
60}

Callers

nothing calls this directly

Calls 3

NewFunction · 0.85
ReadLastMethod · 0.80
WriteMethod · 0.65

Tested by

no test coverage detected