(t *testing.T)
| 979 | } |
| 980 | |
| 981 | func TestMoveFileWithIgnoreExisting(t *testing.T) { |
| 982 | ctx := context.Background() |
| 983 | ctx, ci := fs.AddConfig(ctx) |
| 984 | r := fstest.NewRun(t) |
| 985 | file1 := r.WriteFile("file1", "file1 contents", t1) |
| 986 | r.CheckLocalItems(t, file1) |
| 987 | |
| 988 | ci.IgnoreExisting = true |
| 989 | |
| 990 | err := operations.MoveFile(ctx, r.Fremote, r.Flocal, file1.Path, file1.Path) |
| 991 | require.NoError(t, err) |
| 992 | r.CheckLocalItems(t) |
| 993 | r.CheckRemoteItems(t, file1) |
| 994 | |
| 995 | // Recreate file with updated content |
| 996 | file1b := r.WriteFile("file1", "file1 modified", t2) |
| 997 | r.CheckLocalItems(t, file1b) |
| 998 | |
| 999 | // Ensure modified file did not transfer and was not deleted |
| 1000 | err = operations.MoveFile(ctx, r.Fremote, r.Flocal, file1.Path, file1b.Path) |
| 1001 | require.NoError(t, err) |
| 1002 | r.CheckLocalItems(t, file1b) |
| 1003 | r.CheckRemoteItems(t, file1) |
| 1004 | } |
| 1005 | |
| 1006 | func TestCaseInsensitiveMoveFile(t *testing.T) { |
| 1007 | ctx := context.Background() |
nothing calls this directly
no test coverage detected
searching dependent graphs…