(t *testing.T)
| 167 | } |
| 168 | |
| 169 | func TestCopyFileBackupDir(t *testing.T) { |
| 170 | ctx := context.Background() |
| 171 | ctx, ci := fs.AddConfig(ctx) |
| 172 | r := fstest.NewRun(t) |
| 173 | if !operations.CanServerSideMove(r.Fremote) { |
| 174 | t.Skip("Skipping test as remote does not support server-side move or copy") |
| 175 | } |
| 176 | |
| 177 | ci.BackupDir = r.FremoteName + "/backup" |
| 178 | |
| 179 | file1 := r.WriteFile("dst/file1", "file1 contents", t1) |
| 180 | r.CheckLocalItems(t, file1) |
| 181 | |
| 182 | file1old := r.WriteObject(ctx, "dst/file1", "file1 contents old", t1) |
| 183 | r.CheckRemoteItems(t, file1old) |
| 184 | |
| 185 | err := operations.CopyFile(ctx, r.Fremote, r.Flocal, file1.Path, file1.Path) |
| 186 | require.NoError(t, err) |
| 187 | r.CheckLocalItems(t, file1) |
| 188 | file1old.Path = "backup/dst/file1" |
| 189 | r.CheckRemoteItems(t, file1old, file1) |
| 190 | } |
| 191 | |
| 192 | // Test with CompareDest set |
| 193 | func TestCopyFileCompareDest(t *testing.T) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…