Skip to content

Conversation

@cutiechicken
Copy link

This PR splits the AdminSuite into separate test cases based on individual routes. The goal is to align with the new testing structure where each route has a dedicated test suite.

Changes Made
Extracted test cases from AdminSuite.scala and created the following new test files under route/administration/:
TestDeleteOrgChanges.scala (The test methods are currently commented out because the prerequisites need adjustment.)
TestGetAdminVersion.scala
TestPostAdminHashpw.scala
TestPostAdminReload.scala
Moved CatalogSuite.scala into route/catalog/

I didn't modify most test cases, except TestPostAdminReload.scal. I tried to structure test data using Seq for better organization and to make the style more aligned with the new approach while ensuring functional consistency with the original tests. However, I did not strictly follow the new approach’s exact structure as I focuses more on maintaining test functionality while making the style closer to the expected refactoring pattern. Let me know if further adjustments are needed to better match the intended structure.

Also, in TestGetAdminStatus.scala I only added a missing test case for root/root access failure that wasn’t covered before. It and the original AdminSuite had overlapping test cases, but due to differences in data initialization between the old and new approaches, directly merging them would have required mixing two different data structures. Most of the existing test cases were already covered in TestGetAdminStatus.scala, I opted not to move everything over—only adding the missing failure case for completeness.

Next Step
I plan to continue splitting other large test suites in a similar manner by breaking them down into route-specific tests. Then, I will gradually refine the internal implementation to better align with the new approach, including improving test coverage and verifying response content. Let me know if this direction makes sense, or if there are specific priorities I should focus on.

Note:
This PR is made from a fork since I think I don’t have direct push access. Let me know if I should continue working from a fork or if I can get push permissions for direct contributions.
image

- Separated AdminSuite into individual test cases based on routes.
- Created directory structure for CatalogSuite.
- Updated TestPostAdminReload test cases with Seq-based data setup.

- Verified all tests pass successfully.

Signed-off-by: Wenyang Cao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant