Skip to content

Add tests for Keycloak token models - #70689

Open
dhkim1920 wants to merge 2 commits into
apache:mainfrom
dhkim1920:add-keycloak-token-datamodel-tests
Open

Add tests for Keycloak token models#70689
dhkim1920 wants to merge 2 commits into
apache:mainfrom
dhkim1920:add-keycloak-token-datamodel-tests

Conversation

@dhkim1920

Copy link
Copy Markdown

Add focused unit coverage for the Keycloak token request and response models.

The tests cover password and client-credentials grant discrimination, validation failures, serialization, and delegation to the token service functions. The corresponding temporary exemption is removed from OVERLOOKED_TESTS.

Testing:

  • uv run --project providers/keycloak pytest providers/keycloak/tests/unit/keycloak/auth_manager/datamodels/test_token.py --cov=providers/keycloak/src/airflow/providers/keycloak/auth_manager/datamodels --cov-report=term-missing -xvs
  • uv run --project providers/keycloak pytest providers/keycloak/tests/unit/keycloak -xvs
  • uv run --project airflow-core pytest airflow-core/tests/unit/always/test_project_structure.py::TestProjectStructure::test_providers_modules_should_have_tests -xvs
  • prek run --from-ref upstream/main --stage pre-commit
  • prek run --from-ref upstream/main --stage manual
  • breeze --answer yes testing providers-tests --parallel-test-types "Providers[common.compat,keycloak]" --run-in-parallel

Was generative AI tooling used to co-author this PR?
  • Yes — Codex (GPT-5)

Generated-by: Codex (GPT-5) following the guidelines

The token request models are exempted from provider test-structure enforcement, leaving grant discrimination and validation behavior without dedicated coverage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants