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

API test for managing secrets privilege #9121

Conversation

kkorchak
Copy link
Contributor

API test for managing secrets privilege

Test steps:

  1. Disable 'All users' privileges
  2. Create a new user
  3. Verify new user can't create secrets
  4. Assign privileges to the new user to manage secrets
  5. Verify new user can create and manage secrets
  6. Remove the policy
  7. Ensure the user can't create a secret after the policy is removed
  8. Remove test user
  9. Restore All users privileges

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the smoke_test Contains changes related to smoke tests label Oct 27, 2023

@pytest.mark.dependency(depends=["test_healthchecks"])
@pytest.fixture(scope="module", autouse=True)
def privileges_and_test_user_setup(admin_session):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should definitely re-use this across tests.

Ideally we could just run the outside logic ONCE across multiple tests. Is there a way to do that?

Copy link
Collaborator

@jjoyce0510 jjoyce0510 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this is looking really really good! Left a few comments.

@maggiehays maggiehays added the hacktoberfest-accepted Acceptance for hacktoberfest https://hacktoberfest.com/participation/ label Oct 31, 2023
@jjoyce0510
Copy link
Collaborator

Nice looking really good. Let's make sure that these new tests pass!

@jjoyce0510 jjoyce0510 merged commit f2eb0cf into datahub-project:master Nov 1, 2023
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Acceptance for hacktoberfest https://hacktoberfest.com/participation/ smoke_test Contains changes related to smoke tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants