1
0
Fork 0

More useful store test helper functions

master
Philip O'Toole 4 years ago
parent 65944f6c15
commit aa2fec4a1f

@ -1261,10 +1261,7 @@ func Test_State(t *testing.T) {
}
}
func mustNewStore(inmem bool) *Store {
path := mustTempDir()
defer os.RemoveAll(path)
func mustNewStoreAtPath(path string, inmem bool) *Store {
cfg := NewDBConfig("", inmem)
s := New(mustMockLister("localhost:0"), &StoreConfig{
DBConf: cfg,
@ -1277,6 +1274,10 @@ func mustNewStore(inmem bool) *Store {
return s
}
func mustNewStore(inmem bool) *Store {
return mustNewStoreAtPath(mustTempDir(), inmem)
}
type mockSnapshotSink struct {
*os.File
}

Loading…
Cancel
Save