Finished store
This commit is contained in:
parent
a09c98c243
commit
6762591ea2
4 changed files with 148 additions and 0 deletions
20
internal/log/store_test.go
Normal file
20
internal/log/store_test.go
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
package log
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
var (
|
||||
write = []byte("hello world")
|
||||
width = uint64(len(write) + lenWidth)
|
||||
)
|
||||
|
||||
func testAppend(t *testing.T, s *store) {
|
||||
t.Helper()
|
||||
for i := uint64(1); i < 4; i++ {
|
||||
n, pos, err := s.Append(write)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue