Skip to content

Commit

Permalink
Revert "remove test"
Browse files Browse the repository at this point in the history
This reverts commit c46431b.
  • Loading branch information
johnnyaug committed Oct 4, 2023
1 parent c46431b commit bcd18d0
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,35 @@ public void testRename_existingDirToExistingNonEmptyDirName() throws IOException
boolean renamed = fs.rename(srcDir, dstDir);
Assert.assertFalse(renamed);
}

// /**
// * Check that a file is renamed when working against a lakeFS version
// * where CopyObject API doesn't exist
// */
// TODO(johnnyaug): Do we still need this test?
//
// @Test
// public void testRename_fallbackStageAPI() throws ApiException, IOException {
// Path src = new Path("lakefs://repo/main/existing-dir1/existing.src");
// ObjectLocation srcObjLoc = fs.pathToObjectLocation(src);
// mockExistingFilePath(srcObjLoc);

// Path fileInDstDir = new Path("lakefs://repo/main/existing-dir2/existing.src");
// ObjectLocation fileObjLoc = fs.pathToObjectLocation(fileInDstDir);
// Path dst = new Path("lakefs://repo/main/existing-dir2");
// ObjectLocation dstObjLoc = fs.pathToObjectLocation(dst);

// mockExistingDirPath(dstObjLoc, ImmutableList.of(fileObjLoc));
// mockDirectoryMarker(fs.pathToObjectLocation(src.getParent()));
// mockMissingCopyAPI();

// boolean renamed = fs.rename(src, dst);
// Assert.assertTrue(renamed);
// Path expectedDstPath = new Path("lakefs://repo/main/existing-dir2/existing.src");
// Assert.assertTrue(dstPathLinkedToSrcPhysicalAddress(srcObjLoc, fs.pathToObjectLocation(expectedDstPath)));
// verifyObjDeletion(srcObjLoc);
// }

@Test
public void testRename_srcAndDstOnDifferentBranch() throws IOException {
Path src = new Path("lakefs://repo/branch/existing.src");
Expand Down

0 comments on commit bcd18d0

Please sign in to comment.