test with stream

master
Bel LaPointe 2021-02-07 13:03:17 -06:00
parent 39ddc93e2f
commit 246008d83b
1 changed files with 57 additions and 54 deletions

View File

@ -4,6 +4,7 @@ import (
"bytes"
"fmt"
"io/ioutil"
"local/storage"
"log"
"os"
"path"
@ -12,6 +13,7 @@ import (
)
func TestLastN(t *testing.T) {
for _, storeName := range []string{storage.MAP.String(), storage.MAPSTREAM.String()} {
d, clean := makeJunk(t)
defer clean()
@ -19,7 +21,7 @@ func TestLastN(t *testing.T) {
N: 3,
Ns: "b",
Root: d,
Store: "map",
Store: storeName,
}
lastn, err := New(conf)
if err != nil {
@ -73,6 +75,7 @@ func TestLastN(t *testing.T) {
} else if len(saved) != 11 {
t.Fatal(len(saved))
}
}
}
func makeJunk(t *testing.T) (string, func()) {