Skip to content

Commit

Permalink
fix(smoke-test): test access to create/revoke personal access tokens (d…
Browse files Browse the repository at this point in the history
  • Loading branch information
ksrinath authored and aviv-julienjehannet committed Jul 17, 2024
1 parent 190ad3a commit 6ed0787
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions smoke-test/tests/privileges/test_privileges.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,8 @@ def test_privilege_to_create_and_manage_ingestion_source():
)


@pytest.mark.skip(reason="Functionality and test needs to be validated for correctness")
@pytest.mark.dependency(depends=["test_healthchecks"])
def test_privilege_to_create_and_manage_access_tokens():
def test_privilege_to_create_and_revoke_personal_access_tokens():
(admin_user, admin_pass) = get_admin_credentials()
admin_session = login_as(admin_user, admin_pass)
user_session = login_as("user", "user")
Expand All @@ -345,13 +344,15 @@ def test_privilege_to_create_and_manage_access_tokens():

# Assign privileges to the new user to create and manage access tokens
policy_urn = create_user_policy(
"urn:li:corpuser:user", ["MANAGE_ACCESS_TOKENS"], admin_session
"urn:li:corpuser:user", ["GENERATE_PERSONAL_ACCESS_TOKENS"], admin_session
)

# Verify new user can create and manage access token(create, revoke)
# Create a access token
_ensure_can_create_access_token(user_session, create_access_token)

wait_for_writes_to_sync()

# List access tokens first to get token id
list_access_tokens = {
"query": """query listAccessTokens($input: ListAccessTokenInput!) {\n
Expand Down

0 comments on commit 6ed0787

Please sign in to comment.