test with stream
This commit is contained in:
@@ -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 {
|
||||
@@ -74,6 +76,7 @@ func TestLastN(t *testing.T) {
|
||||
t.Fatal(len(saved))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func makeJunk(t *testing.T) (string, func()) {
|
||||
d, err := ioutil.TempDir(os.TempDir(), "lastNtest*")
|
||||
|
||||
Reference in New Issue
Block a user