Test moving a file over itself
(t *testing.T)
| 673 | |
| 674 | // Test moving a file over itself |
| 675 | func TestMoveOverSelf(t *testing.T) { |
| 676 | ctx := context.Background() |
| 677 | r := fstest.NewRun(t) |
| 678 | file1 := r.WriteObject(ctx, "sub dir/hello world", "hello world", t1) |
| 679 | r.CheckRemoteItems(t, file1) |
| 680 | file2 := r.WriteFile("sub dir/hello world", "hello world again", t2) |
| 681 | r.CheckLocalItems(t, file2) |
| 682 | |
| 683 | ctx = predictDstFromLogger(ctx) |
| 684 | err := MoveDir(ctx, r.Fremote, r.Flocal, false, false) |
| 685 | require.NoError(t, err) |
| 686 | testLoggerVsLsf(ctx, r.Fremote, r.Flocal, operations.GetLoggerOpt(ctx).JSON, t) |
| 687 | r.CheckLocalItems(t) |
| 688 | r.CheckRemoteItems(t, file2) |
| 689 | } |
| 690 | |
| 691 | // Test server-side moving a file over itself |
| 692 | func TestServerSideMoveOverSelf(t *testing.T) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…