Test MoveDir on Local
(t *testing.T)
| 1791 | |
| 1792 | // Test MoveDir on Local |
| 1793 | func TestServerSideMoveLocal(t *testing.T) { |
| 1794 | ctx := context.Background() |
| 1795 | r := fstest.NewRun(t) |
| 1796 | f1 := r.WriteFile("dir1/file1.txt", "hello", t1) |
| 1797 | f2 := r.WriteFile("dir2/file2.txt", "hello again", t2) |
| 1798 | r.CheckLocalItems(t, f1, f2) |
| 1799 | |
| 1800 | dir1, err := fs.NewFs(ctx, r.Flocal.Root()+"/dir1") |
| 1801 | require.NoError(t, err) |
| 1802 | dir2, err := fs.NewFs(ctx, r.Flocal.Root()+"/dir2") |
| 1803 | require.NoError(t, err) |
| 1804 | err = MoveDir(ctx, dir2, dir1, false, false) |
| 1805 | require.NoError(t, err) |
| 1806 | } |
| 1807 | |
| 1808 | // Test move |
| 1809 | func TestMoveWithDeleteEmptySrcDirs(t *testing.T) { |