mirror of
https://github.com/chaisql/chai.git
synced 2025-12-24 11:30:53 +08:00
* Bump pebble to 1.1.5 and fix call sites. * tidy go.mod in /cmd/chai * Fix /cmd/chai refernece to NewIter
23 lines
373 B
Go
23 lines
373 B
Go
package testutil
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
|
|
"github.com/cockroachdb/pebble"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func DumpPebble(t testing.TB, pdb *pebble.DB) {
|
|
t.Helper()
|
|
it, err := pdb.NewIter(nil)
|
|
require.NoError(t, err)
|
|
|
|
for it.First(); it.Valid(); it.Next() {
|
|
fmt.Printf("%v: %v\n", it.Key(), it.Value())
|
|
}
|
|
|
|
err = it.Close()
|
|
require.NoError(t, err)
|
|
}
|