mirror of
https://github.com/rclone/rclone.git
synced 2025-08-19 09:52:05 +02:00
sync: fix integrations tests
2eb31a4f1d
broke the integration tests for remotes which use
Copy+Delete as server side Move.
This commit is contained in:
@@ -995,9 +995,17 @@ func TestSyncWithTrackRenames(t *testing.T) {
|
|||||||
fstest.CheckItems(t, r.Fremote, f1, f2)
|
fstest.CheckItems(t, r.Fremote, f1, f2)
|
||||||
|
|
||||||
if canTrackRenames {
|
if canTrackRenames {
|
||||||
assert.Equal(t, int64(0), accounting.Stats.GetTransfers())
|
if r.Fremote.Features().Move == nil {
|
||||||
|
// If no server side Move, we are falling back to Copy + Delete
|
||||||
|
assert.Equal(t, int64(1), accounting.Stats.GetTransfers()) // 1 copy
|
||||||
|
assert.Equal(t, int64(4), accounting.Stats.GetChecks()) // 2 file checks + 1 move + 1 delete
|
||||||
|
} else {
|
||||||
|
assert.Equal(t, int64(0), accounting.Stats.GetTransfers()) // 0 copy
|
||||||
|
assert.Equal(t, int64(3), accounting.Stats.GetChecks()) // 2 file checks + 1 move
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
assert.Equal(t, int64(1), accounting.Stats.GetTransfers())
|
assert.Equal(t, int64(2), accounting.Stats.GetChecks()) // 2 file checks
|
||||||
|
assert.Equal(t, int64(1), accounting.Stats.GetTransfers()) // 0 copy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user