Skip to content

Commit

Permalink
🧪 skip auth tests in regression mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ff137 committed Oct 31, 2024
1 parent 470d81e commit 93b280d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions app/tests/e2e/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from app.routes.admin.tenants import router as tenants_router
from app.routes.connections import router as connections_router
from app.tests.util.regression_testing import TestMode
from shared.constants import TENANT_FASTAPI_ENDPOINT
from shared.util.rich_async_client import RichAsyncClient

Expand All @@ -15,7 +16,14 @@

group_id = "TestGroup"

skip_regression_test_reason = "Don't need to cover auth tests in regression mode"


@pytest.mark.anyio
@pytest.mark.skipif(
TestMode.regression_run in TestMode.fixture_params,
reason=skip_regression_test_reason,
)
@pytest.mark.anyio
async def test_invalid_acapy_auth_header(alice_acapy_client: AcaPyClient):
# Modify the AcaPyClient to use the wrong header -- assert ACA-Py auth error
Expand All @@ -34,6 +42,10 @@ async def test_invalid_acapy_auth_header(alice_acapy_client: AcaPyClient):


@pytest.mark.anyio
@pytest.mark.skipif(
TestMode.regression_run in TestMode.fixture_params,
reason=skip_regression_test_reason,
)
async def test_jwt_invalid_token_error(tenant_admin_client: RichAsyncClient):
# Step 1: Create a tenant and get a valid access token
response = await tenant_admin_client.post(
Expand Down Expand Up @@ -83,6 +95,10 @@ async def test_jwt_invalid_token_error(tenant_admin_client: RichAsyncClient):


@pytest.mark.anyio
@pytest.mark.skipif(
TestMode.regression_run in TestMode.fixture_params,
reason=skip_regression_test_reason,
)
async def test_invalid_token_error_after_rotation(tenant_admin_client: RichAsyncClient):
# Step 1: Create a tenant and get a valid access token
response = await tenant_admin_client.post(
Expand Down

0 comments on commit 93b280d

Please sign in to comment.