Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improve][test] Add operation authentication test for namespace API #22398

Merged

Conversation

coderzc
Copy link
Member

@coderzc coderzc commented Apr 2, 2024

Motivation

Add operation authentication test for namespace API.

Modifications

Check AuthAction and Operation for API

Covered API: setProperties, removeProperty, clearProperties, getProperty, getTopics, getBundles, unloadNamespaceBundle, splitNamespaceBundle, grantPermissionOnNamespace, getPermissions, revokePermissionsOnNamespace, grantPermissionOnSubscription, getPermissionsOnSubscription, revokePermissionsOnSubscription, clearNamespaceBacklog, unsubscribeNamespace, unsubscribeNamespaceBundle, upload, download, listPackages, listPackageVersions, getMetadata,
setBookieAffinityGroup, getBookieAffinityGroup, deleteBookieAffinityGroup.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Apr 2, 2024
@coderzc coderzc force-pushed the admin_auth_test_namespace_operation branch 3 times, most recently from 6c327d4 to a29f8e3 Compare April 2, 2024 12:44
@coderzc coderzc force-pushed the admin_auth_test_namespace_operation branch from a29f8e3 to ab1cdd3 Compare April 2, 2024 13:38
@coderzc coderzc self-assigned this Apr 3, 2024
@liangyepianzhou
Copy link
Contributor

liangyepianzhou commented Apr 6, 2024

How about abstracting these tests in one test via the function method?
Just like this, it could reduce a lot of reduplicated code.

@Technoboy- Technoboy- closed this Apr 7, 2024
@Technoboy- Technoboy- reopened this Apr 7, 2024
@Technoboy- Technoboy- added this to the 3.3.0 milestone Apr 7, 2024
@coderzc coderzc force-pushed the admin_auth_test_namespace_operation branch 5 times, most recently from 2123dc7 to 77d4b08 Compare April 8, 2024 14:26
@coderzc coderzc force-pushed the admin_auth_test_namespace_operation branch from 77d4b08 to 51b867c Compare April 8, 2024 15:31
@Technoboy- Technoboy- merged commit 6de711d into apache:master Apr 9, 2024
48 of 49 checks passed
@lhotari
Copy link
Member

lhotari commented Apr 9, 2024

@coderzc this introduced a new flaky test, please see #22466

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs ready-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants