swarm/shed, swarm/storage/localstore: add LastPullSubscriptionChunk (#19190)

* swarm/shed, swarm/storage/localstore: add LastPullSubscriptionChunk

* swarm/shed: fix comments

* swarm/shed: fix TestIncByteSlice test

* swarm/storage/localstore: fix TestDB_LastPullSubscriptionChunk
This commit is contained in:
Janoš Guljaš
2019-03-02 08:44:22 +01:00
committed by Viktor Trón
parent 729bf365b5
commit b797dd07d2
5 changed files with 328 additions and 15 deletions

View File

@@ -100,11 +100,13 @@ func newTestDB(t *testing.T) (db *DB, cleanupFunc func()) {
if err != nil {
t.Fatal(err)
}
cleanupFunc = func() { os.RemoveAll(dir) }
db, err = NewDB(dir, "")
if err != nil {
cleanupFunc()
os.RemoveAll(dir)
t.Fatal(err)
}
return db, cleanupFunc
return db, func() {
db.Close()
os.RemoveAll(dir)
}
}