lib/model: Fix addFakeConn and other test improvements (#7684)

This commit is contained in:
Simon Frei
2021-05-16 17:23:27 +02:00
committed by GitHub
parent 96dae7bfec
commit 5b90a98650
6 changed files with 46 additions and 41 deletions
+6 -6
View File
@@ -43,7 +43,7 @@ func TestRecvOnlyRevertDeletes(t *testing.T) {
// Send and index update for the known stuff
m.Index(device1, "ro", knownFiles)
must(t, m.Index(device1, "ro", knownFiles))
f.updateLocalsFromScanning(knownFiles)
size := globalSize(t, m, "ro")
@@ -119,7 +119,7 @@ func TestRecvOnlyRevertNeeds(t *testing.T) {
// Send and index update for the known stuff
m.Index(device1, "ro", knownFiles)
must(t, m.Index(device1, "ro", knownFiles))
f.updateLocalsFromScanning(knownFiles)
// Scan the folder.
@@ -208,7 +208,7 @@ func TestRecvOnlyUndoChanges(t *testing.T) {
// Send an index update for the known stuff
m.Index(device1, "ro", knownFiles)
must(t, m.Index(device1, "ro", knownFiles))
f.updateLocalsFromScanning(knownFiles)
// Scan the folder.
@@ -277,7 +277,7 @@ func TestRecvOnlyDeletedRemoteDrop(t *testing.T) {
// Send an index update for the known stuff
m.Index(device1, "ro", knownFiles)
must(t, m.Index(device1, "ro", knownFiles))
f.updateLocalsFromScanning(knownFiles)
// Scan the folder.
@@ -341,7 +341,7 @@ func TestRecvOnlyRemoteUndoChanges(t *testing.T) {
// Send an index update for the known stuff
m.Index(device1, "ro", knownFiles)
must(t, m.Index(device1, "ro", knownFiles))
f.updateLocalsFromScanning(knownFiles)
// Scan the folder.
@@ -396,7 +396,7 @@ func TestRecvOnlyRemoteUndoChanges(t *testing.T) {
return true
})
snap.Release()
m.IndexUpdate(device1, "ro", files)
must(t, m.IndexUpdate(device1, "ro", files))
// Ensure the pull to resolve conflicts (content identical) happened
must(t, f.doInSync(func() error {