mirror of
https://github.com/rclone/rclone.git
synced 2024-11-25 18:04:55 +01:00
Explicitly check the state in tests after writing files
...otherwise Amazon Drive will fail.
This commit is contained in:
parent
a6056408dd
commit
b9c8e61d39
@ -301,7 +301,10 @@ func TestSyncAfterChangingModtimeOnly(t *testing.T) {
|
||||
r := NewRun(t)
|
||||
defer r.Finalise()
|
||||
file1 := r.WriteFile("empty space", "", t2)
|
||||
r.WriteObject("empty space", "", t1)
|
||||
file2 := r.WriteObject("empty space", "", t1)
|
||||
|
||||
fstest.CheckItems(t, r.flocal, file1)
|
||||
fstest.CheckItems(t, r.fremote, file2)
|
||||
|
||||
fs.Stats.ResetCounters()
|
||||
err := fs.Sync(r.fremote, r.flocal)
|
||||
@ -322,6 +325,9 @@ func TestSyncAfterChangingModtimeOnlyWithNoUpdateModTime(t *testing.T) {
|
||||
file1 := r.WriteFile("empty space", "", t2)
|
||||
file2 := r.WriteObject("empty space", "", t1)
|
||||
|
||||
fstest.CheckItems(t, r.flocal, file1)
|
||||
fstest.CheckItems(t, r.fremote, file2)
|
||||
|
||||
fs.Stats.ResetCounters()
|
||||
err := fs.Sync(r.fremote, r.flocal)
|
||||
require.NoError(t, err)
|
||||
@ -336,6 +342,9 @@ func TestSyncAfterAddingAFile(t *testing.T) {
|
||||
file1 := r.WriteBoth("empty space", "", t2)
|
||||
file2 := r.WriteFile("potato", "------------------------------------------------------------", t3)
|
||||
|
||||
fstest.CheckItems(t, r.flocal, file1, file2)
|
||||
fstest.CheckItems(t, r.fremote, file1)
|
||||
|
||||
fs.Stats.ResetCounters()
|
||||
err := fs.Sync(r.fremote, r.flocal)
|
||||
require.NoError(t, err)
|
||||
@ -478,6 +487,8 @@ func TestSyncWithExclude(t *testing.T) {
|
||||
file1 := r.WriteBoth("potato2", "------------------------------------------------------------", t1)
|
||||
file2 := r.WriteBoth("empty space", "", t2)
|
||||
file3 := r.WriteFile("enormous", "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", t1) // 100 bytes
|
||||
fstest.CheckItems(t, r.fremote, file1, file2)
|
||||
fstest.CheckItems(t, r.flocal, file1, file2, file3)
|
||||
|
||||
fs.Config.Filter.MaxSize = 40
|
||||
defer func() {
|
||||
|
Loading…
Reference in New Issue
Block a user