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

Add explicit test_auth dependencies #3392

Merged
merged 2 commits into from
Apr 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/pbench/test/unit/server/auth/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,9 @@ def test_verify_auth_invsig(self, make_logger, pbench_drb_token):
assert user is None

@pytest.mark.parametrize("roles", [["ROLE"], ["ROLE1", "ROLE2"], [], None])
def test_verify_auth_oidc(self, monkeypatch, rsa_keys, make_logger, roles):
def test_verify_auth_oidc(
self, monkeypatch, db_session, rsa_keys, make_logger, roles
):
"""Verify OIDC token offline verification success path"""
client_id = "us"
if roles is None:
Expand All @@ -543,7 +545,9 @@ def test_verify_auth_oidc(self, monkeypatch, rsa_keys, make_logger, roles):
assert user.id == "12345"
assert user.roles == (roles if roles else [])

def test_verify_auth_oidc_user_update(self, monkeypatch, rsa_keys, make_logger):
def test_verify_auth_oidc_user_update(
self, monkeypatch, db_session, rsa_keys, make_logger
):
"""Verify we update our internal user database when we get updated user
payload from the OIDC token for an existing user."""
client_id = "us"
Expand Down