-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Problem
All 5 tests in tests/e2e/test_oidc_bridge.py are skipping. The auths-oidc-bridge binary is built by cargo build --workspace (it's a separate crate with its own [[bin]]), but three of the five tests contain hardcoded pytest.skip() calls because they were written before the E2E helpers for attestation extraction existed.
Current state (36 total E2E tests)
| Result | Count | Notes |
|---|---|---|
| PASS | 31 | |
| SKIP | 5 | All OIDC bridge |
Skip reasons per test
| Test | Skip reason | Fix needed |
|---|---|---|
test_bridge_health |
Binary not on PATH (only in target/debug/) or bridge fails to start |
Ensure conftest._find_binary resolves it; check bridge startup env |
test_token_exchange |
Hardcoded pytest.skip("GAP: requires full attestation chain creation via CLI") |
Use export_attestation() helper to create a real attestation, POST it to /api/v1/token |
test_token_jwt_claims |
Hardcoded pytest.skip("GAP: requires token exchange to produce JWT first") |
Chain off test_token_exchange: decode the returned JWT with PyJWT, assert standard claims (iss, sub, aud, exp, capabilities) |
test_token_invalid_attestation |
Depends on bridge fixture starting | Should pass once bridge starts — already has the right test logic |
test_token_expired_attestation |
Hardcoded pytest.skip("GAP: requires attestation creation with past expiry") |
Use device link --expires-in-days 0 (or a very short TTL), wait, then POST to bridge and assert rejection |
What's needed
-
Bridge startup: The
oidc_bridgefixture needs the binary to be discoverable. It's built totarget/debug/auths-oidc-bridgewhichconftest._find_binaryshould find — verify this works and check if the bridge needs additional env vars (e.g.,AUTHS_HOME) beyondAUTHS_OIDC_BIND_ADDRandAUTHS_OIDC_SIGNING_KEY_PATH. -
Attestation helpers: The
export_attestation()helper intests/e2e/helpers/cli.pynow extracts attestation JSON from the auths git repo. Use it to feed real attestation chains to the bridge's/api/v1/tokenendpoint. -
Remove hardcoded skips: Replace the three
pytest.skip("GAP: ...")calls with actual test implementations:test_token_exchange: export attestation → POST to bridge → assert 200 + JWT returnedtest_token_jwt_claims: decode JWT → assert claims match attestation datatest_token_expired_attestation: create short-lived attestation → POST → assert 4xx
-
Python deps:
test_token_jwt_claimsneedsPyJWT— confirm it's in the E2Epyproject.tomldev dependencies.
Context
The export_attestation() helper and all other E2E test gaps were fixed in #29. The OIDC bridge tests are the only remaining skips.
Acceptance criteria
- All 5 OIDC bridge tests pass (or fail with real assertion errors, not skips)
uv run pytest -vshows 36 passed, 0 skipped