Skip to content

HDDS-15109. Extract rename test cases to OzoneFileSystemTests#10120

Open
len548 wants to merge 1 commit intoapache:masterfrom
len548:HDDS-12355-5
Open

HDDS-15109. Extract rename test cases to OzoneFileSystemTests#10120
len548 wants to merge 1 commit intoapache:masterfrom
len548:HDDS-12355-5

Conversation

@len548
Copy link
Copy Markdown
Contributor

@len548 len548 commented Apr 24, 2026

What changes were proposed in this pull request?

There are duplicates of rename tests between AbstractOzoneFileSystemTest and AbstractRootedOzoneFileSystemTest.

  • testRenameFile
  • testRenameFileToDir
  • testRenameToParentDir
  • testRenameDirToItsOwnSubDir
  • testRenameDestinationParentDoesntExist (O3FS) / testRenameDestinationParentDoesNotExist (OFS) – same test, different spelling.

This PR moved shared logic of these tests to OzoneFileSystemTestBase and also introduced a helper method pathUnderFsRoot(String p) which centralizes the difference “fs.getUri().toString() + path” (O3FS) vs "getBucketPath() + path" (OFS) by template method pattern.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-15109

How was this patch tested?

CI pass: https://github.com/len548/ozone/actions/runs/24833798824

@adoroszlai adoroszlai added test code-cleanup Changes that aim to make code better, without changing functionality. labels Apr 24, 2026
@adoroszlai adoroszlai requested a review from sadanand48 April 25, 2026 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-cleanup Changes that aim to make code better, without changing functionality. test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants