mirror of
https://github.com/rclone/rclone.git
synced 2024-11-25 18:04:55 +01:00
operations: use --download for TestApplyTransforms #7591
This makes it possible to run the test even on remotes without MD5 support.
This commit is contained in:
parent
f3680d222c
commit
885a543023
@ -563,9 +563,6 @@ func TestApplyTransforms(t *testing.T) {
|
|||||||
|
|
||||||
testScenario := func(checkfileName, remotefileName, scenario string) {
|
testScenario := func(checkfileName, remotefileName, scenario string) {
|
||||||
r := fstest.NewRunIndividual(t)
|
r := fstest.NewRunIndividual(t)
|
||||||
if !r.Flocal.Hashes().Contains(hashType) || !r.Fremote.Hashes().Contains(hashType) {
|
|
||||||
t.Skipf("Fs lacks %s, skipping", hashType)
|
|
||||||
}
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
ci := fs.GetConfig(ctx)
|
ci := fs.GetConfig(ctx)
|
||||||
opt := operations.CheckOpt{}
|
opt := operations.CheckOpt{}
|
||||||
@ -580,7 +577,7 @@ func TestApplyTransforms(t *testing.T) {
|
|||||||
ci.NoUnicodeNormalization = true
|
ci.NoUnicodeNormalization = true
|
||||||
ci.IgnoreCaseSync = false
|
ci.IgnoreCaseSync = false
|
||||||
accounting.GlobalStats().ResetCounters()
|
accounting.GlobalStats().ResetCounters()
|
||||||
err := operations.CheckSum(ctx, r.Fremote, r.Flocal, "test.sum", hashType, &opt, false)
|
err := operations.CheckSum(ctx, r.Fremote, r.Flocal, "test.sum", hashType, &opt, true)
|
||||||
assert.Error(t, err, "no expected error for %s %v %v", testname, checkfileName, remotefileName)
|
assert.Error(t, err, "no expected error for %s %v %v", testname, checkfileName, remotefileName)
|
||||||
|
|
||||||
testname = scenario + " (with normalization)"
|
testname = scenario + " (with normalization)"
|
||||||
@ -588,7 +585,7 @@ func TestApplyTransforms(t *testing.T) {
|
|||||||
ci.NoUnicodeNormalization = false
|
ci.NoUnicodeNormalization = false
|
||||||
ci.IgnoreCaseSync = true
|
ci.IgnoreCaseSync = true
|
||||||
accounting.GlobalStats().ResetCounters()
|
accounting.GlobalStats().ResetCounters()
|
||||||
err = operations.CheckSum(ctx, r.Fremote, r.Flocal, "test.sum", hashType, &opt, false)
|
err = operations.CheckSum(ctx, r.Fremote, r.Flocal, "test.sum", hashType, &opt, true)
|
||||||
assert.NoError(t, err, "unexpected error for %s %v %v", testname, checkfileName, remotefileName)
|
assert.NoError(t, err, "unexpected error for %s %v %v", testname, checkfileName, remotefileName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user