test with stream
parent
39ddc93e2f
commit
246008d83b
|
|
@ -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()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue