lib/db, lib/model: Remove filesystem state from FileSet (fixes #7850) (#8151)

This commit is contained in:
Simon Frei
2022-01-31 10:12:52 +01:00
committed by GitHub
parent d1e81a0acf
commit 635085d139
11 changed files with 70 additions and 80 deletions
+2 -3
View File
@@ -12,7 +12,6 @@ import (
"testing"
"github.com/syncthing/syncthing/lib/events"
"github.com/syncthing/syncthing/lib/fs"
"github.com/syncthing/syncthing/lib/protocol"
)
@@ -109,7 +108,7 @@ func TestRecalcMeta(t *testing.T) {
defer ldb.Close()
// Add some files
s1 := newFileSet(t, "test", fs.NewFilesystem(fs.FilesystemTypeFake, "fake"), ldb)
s1 := newFileSet(t, "test", ldb)
files := []protocol.FileInfo{
{Name: "a", Size: 1000},
{Name: "b", Size: 2000},
@@ -161,7 +160,7 @@ func TestRecalcMeta(t *testing.T) {
}
// Create a new fileset, which will realize the inconsistency and recalculate
s2 := newFileSet(t, "test", fs.NewFilesystem(fs.FilesystemTypeFake, "fake"), ldb)
s2 := newFileSet(t, "test", ldb)
// Verify local/global size
snap = snapshot(t, s2)