Commit 81e2a23
authored
Add parametrized unit tests for auth types across host profiles (#1357)
## Summary
- Adds `tests/test_auth_profiles.py` with 90 parametrized unit tests
covering 16 auth types across 6 host profiles (LW, NW, LA, NA, SPOGW,
SPOGA)
- Existing unit tests cover Legacy Workspace (LW) and Legacy Account
(LA) — we assume those are correct and working, and build on them to
verify that auth resolution also works for the remaining profiles (NW,
NA, SPOGW, SPOGA)
- SPOG profiles use account-level OIDC endpoints with `{account_id}`
template, matching real SPOG host metadata behavior
- Environment-locked types (runtime, runtime-oauth, model-serving,
metadata-service) only tested on workspace profiles — they never run at
account level. A separate PR will be created to investigate support with
SPOG.
- Cloud-specific auth types use appropriate host patterns (Azure for
azure-*, GCP for google-*)
### Profiles tested
| Profile | Description | Derivation |
|---|---|---|
| LW | Legacy Workspace | Baseline (existing tests) |
| NW | New Workspace | LW + `account_id` + `workspace_id` |
| LA | Legacy Account | Baseline (existing tests) |
| NA | New Account | Structurally same as LA |
| SPOGW | SPOG workspace | Unified host + `account_id` + `workspace_id`
|
| SPOGA | SPOG account | Unified host + `account_id` |
### Auth types covered
pat, basic, oauth-m2m, databricks-cli, env-oidc, file-oidc, github-oidc,
azure-client-secret, azure-cli, github-oidc-azure, azure-devops-oidc,
google-credentials, google-id, metadata-service, runtime, runtime-oauth,
model-serving
## Test plan
- [x] All 90 new tests pass locally
- [x] Existing tests unaffected (197 total pass with test_auth.py +
test_config.py + test_auth_profiles.py)
- [x] CI passes
NO_CHANGELOG=true
This pull request was AI-assisted by Isaac.1 parent 1971711 commit 81e2a23
1 file changed
Lines changed: 595 additions & 0 deletions
0 commit comments