diff --git a/.forgejo/workflows/dev.yml b/.forgejo/workflows/dev.yml index 4bff0a6..9846e14 100644 --- a/.forgejo/workflows/dev.yml +++ b/.forgejo/workflows/dev.yml @@ -40,6 +40,11 @@ jobs: SIMPLESAMLPHP_SP_ENTITY_ID: http://localhost:13003/auth/saml/test-saml/metadata SIMPLESAMLPHP_SP_ASSERTION_CONSUMER_SERVICE: http://localhost:13003/auth/saml/test-saml/callback SIMPLESAMLPHP_IDP_BASE_URL: http://mock-saml:8080/simplesaml/ + options: >- + --health-cmd "curl -sf http://localhost:8080/simplesaml/ || wget -q -O /dev/null http://localhost:8080/simplesaml/ || exit 1" + --health-interval 5s + --health-timeout 5s + --health-retries 10 env: CI: "true" WG_DATABASE_URL: postgresql+asyncpg://wiregui:wiregui@postgres/wiregui diff --git a/tests/e2e/test_saml_login.py b/tests/e2e/test_saml_login.py index 2942750..9d275cb 100644 --- a/tests/e2e/test_saml_login.py +++ b/tests/e2e/test_saml_login.py @@ -140,7 +140,7 @@ async def test_saml_redirect_to_idp(app_with_saml, page: Page): """Clicking SAML login redirects to the SimpleSAMLphp IdP login page.""" await page.goto(f"{SAML_APP_BASE}/auth/saml/test-saml") # Should redirect to the SimpleSAMLphp SSO service - await page.wait_for_url(f"**{MOCK_SAML_HOST}:8080/simplesaml/**", timeout=10_000) + await page.wait_for_url(f"**{MOCK_SAML_HOST}:8080/simplesaml/**", timeout=30_000) async def test_saml_sp_metadata_endpoint(app_with_saml, page: Page): @@ -155,7 +155,7 @@ async def test_saml_sp_metadata_endpoint(app_with_saml, page: Page): async def test_full_saml_login_flow(app_with_saml, page: Page): """Full SAML SSO flow: app → IdP login → callback → authenticated.""" await page.goto(f"{SAML_APP_BASE}/auth/saml/test-saml") - await page.wait_for_url(f"**{MOCK_SAML_HOST}:8080/simplesaml/**", timeout=10_000) + await page.wait_for_url(f"**{MOCK_SAML_HOST}:8080/simplesaml/**", timeout=30_000) # SimpleSAMLphp login form await page.locator("input[name='username']").fill("user1")