Skip to content

Commit 4b0df05

Browse files
committed
bisync: disable --sftp-copy-is-hardlink on sftp tests
Before this change, TestSFTPOpenssh integration tests would fail due to setting copy_is_hardlink=true in /fstest/testserver/init.d/TestSFTPOpenssh. For example, if a file was server-side copied from path1 to path2 and then the bisync tests set the path2 modtime, the path1 modtime would also unexpectedly mutate. Hardlinks are not the same as copies. The bisync tests assume that they can modify a file on one side without affecting a file on the other. This change essentially sets --sftp-copy-is-hardlink to the default of false for the bisync tests.
1 parent a92af34 commit 4b0df05

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

cmd/bisync/bisync_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,12 @@ func (b *bisyncTest) checkPreReqs(ctx context.Context, opt *bisync.Options) (con
953953
b.fs2.Features().Disable("Copy") // API has longstanding bug for conflictBehavior=replace https://github.com/rclone/rclone/issues/4590
954954
b.fs2.Features().Disable("Move")
955955
}
956+
if strings.HasPrefix(b.fs1.String(), "sftp") {
957+
b.fs1.Features().Disable("Copy") // disable --sftp-copy-is-hardlink as hardlinks are not truly copies
958+
}
959+
if strings.HasPrefix(b.fs2.String(), "sftp") {
960+
b.fs2.Features().Disable("Copy") // disable --sftp-copy-is-hardlink as hardlinks are not truly copies
961+
}
956962
if strings.Contains(strings.ToLower(fs.ConfigString(b.fs1)), "mailru") || strings.Contains(strings.ToLower(fs.ConfigString(b.fs2)), "mailru") {
957963
fs.GetConfig(ctx).TPSLimit = 10 // https://github.com/rclone/rclone/issues/7768#issuecomment-2060888980
958964
}

fstest/test_all/config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ backends:
322322
remote: "TestSFTPOpenssh:"
323323
fastlist: false
324324
ignoretests:
325-
- cmd/bisync
326325
- cmd/gitannex
327326
- backend: "sftp"
328327
remote: "TestSFTPRclone:"

0 commit comments

Comments
 (0)