lib/db, lib/model: Create temp sorting database in config dir (fixes #3449)

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3454
This commit is contained in:
Jakob Borg
2016-07-27 21:38:43 +00:00
committed by Audrius Butkevicius
parent aafc96f58f
commit 72026db599
4 changed files with 27 additions and 16 deletions

View File

@@ -30,7 +30,7 @@ func TestOnDiskIndexSorter(t *testing.T) {
// An onDiskSorter should be able to absorb a few files in unsorted
// order, and return them sorted.
s := newOnDiskIndexSorter()
s := newOnDiskIndexSorter("testdata")
addFiles(50, s)
verifySorted(t, s, 50)
verifyBreak(t, s, 50)
@@ -58,7 +58,7 @@ func TestIndexSorter(t *testing.T) {
// An default IndexSorter should be able to absorb files, have them in
// memory, and at some point switch to an on disk database.
s := NewIndexSorter()
s := NewIndexSorter("testdata")
defer s.Close()
// We should start out as an in memory store.