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