mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
fstest: add precision to CompareItems so it works on non-local remotes
This commit is contained in:
@@ -207,9 +207,10 @@ func TestMarch(t *testing.T) {
|
||||
err := mt.currentError()
|
||||
require.NoError(t, err)
|
||||
|
||||
fstest.CompareItems(t, mt.srcOnly, srcOnly, test.dirSrcOnly, "srcOnly")
|
||||
fstest.CompareItems(t, mt.dstOnly, dstOnly, test.dirDstOnly, "dstOnly")
|
||||
fstest.CompareItems(t, mt.match, match, test.dirMatch, "match")
|
||||
precision := fs.GetModifyWindow(r.Fremote, r.Flocal)
|
||||
fstest.CompareItems(t, mt.srcOnly, srcOnly, test.dirSrcOnly, precision, "srcOnly")
|
||||
fstest.CompareItems(t, mt.dstOnly, dstOnly, test.dirDstOnly, precision, "dstOnly")
|
||||
fstest.CompareItems(t, mt.match, match, test.dirMatch, precision, "match")
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -273,8 +274,9 @@ func TestMarchNoTraverse(t *testing.T) {
|
||||
err := mt.currentError()
|
||||
require.NoError(t, err)
|
||||
|
||||
fstest.CompareItems(t, mt.srcOnly, srcOnly, test.dirSrcOnly, "srcOnly")
|
||||
fstest.CompareItems(t, mt.match, match, test.dirMatch, "match")
|
||||
precision := fs.GetModifyWindow(r.Fremote, r.Flocal)
|
||||
fstest.CompareItems(t, mt.srcOnly, srcOnly, test.dirSrcOnly, precision, "srcOnly")
|
||||
fstest.CompareItems(t, mt.match, match, test.dirMatch, precision, "match")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user