Skip to content

Refactoring for Unit Test Access Controls #13304

@InfinityTwo

Description

@InfinityTwo

Part of #12048

Issue

After most of the Unit Test migration in #12048, there are a lot of inconsistencies in access control test methods. This is because we did not migrate the many convenient, abstracted, and commonly used access control test methods from ui/webapi/BaseActionTest.java to sqlui/webapi/BaseActionTest.java.

After merging #13254, all of the access control test methods in BaseActionTest.java have been migrated. Hence, this issue aims to refactor the unit test access controls to use these convenient test methods.

Progress

The progress for this refactoring can be found here. I (the author) will update it when completed PRs are merged proactively.

Steps to Contribute

  1. Choose test(s) to work on in the above Google Sheets link
  2. Check that no on else have claimed the test cases to work on within the last 2 weeks, or that it has been completed by follow up PRs (but not updated in the sheets)
  3. Comment on this issue to indicate that you'd like to contribute on the chosen test(s). Update your comment if you need more than 2 weeks so that other contributors don't overlap with your work.
  4. Create a PR to refactor the unit test(s).
  5. Submit the PR, with a link to this issue by starting the description with "Part of Refactoring for Unit Test Access Controls #13304".
  6. Tag me or any other active reviewers and wait for us to review (so that we can get a notification)

Tips

  • Understand the access control test methods in sqlui/webapi/BaseActionTest.java, follow the refactoring in [#12048] Abstract Access Controls to BaseActionTest #13254
  • Most of the access control testing logic in the migrated unit tests under sqlui/webapi follows the old unit tests under ui/webapi, so you may wish to reference the old unit test for help

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-AccessControlControlling access to user groups, authentication, privacy, anonymityc.TaskOther non-user-facing works, e.g. refactoring, adding testsgood first issueEasy; restricted for first-time contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions