Commit 235fa217 authored by Steven Allen's avatar Steven Allen

test autobatch against the test suite

parent 82516f58
...@@ -6,27 +6,11 @@ import ( ...@@ -6,27 +6,11 @@ import (
"testing" "testing"
ds "github.com/ipfs/go-datastore" ds "github.com/ipfs/go-datastore"
dstest "github.com/ipfs/go-datastore/test"
) )
func TestBasicPuts(t *testing.T) { func TestAutobatch(t *testing.T) {
d := NewAutoBatching(ds.NewMapDatastore(), 16) dstest.SubtestAll(t, NewAutoBatching(ds.NewMapDatastore(), 16))
k := ds.NewKey("test")
v := []byte("hello world")
err := d.Put(k, v)
if err != nil {
t.Fatal(err)
}
out, err := d.Get(k)
if err != nil {
t.Fatal(err)
}
if !bytes.Equal(out, v) {
t.Fatal("wasnt the same! ITS NOT THE SAME")
}
} }
func TestFlushing(t *testing.T) { func TestFlushing(t *testing.T) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment