Browse Source

chore: ci fixes (#686)

* chore: ci fixes

* chore: backports
pull/650/merge
Richard Nemeth 3 days ago
committed by GitHub
parent
commit
7d9b8af2f8
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      .github/workflows/daily.yaml
  2. 8
      .github/workflows/lint.yaml
  3. 2
      .github/workflows/publish.yaml
  4. 2
      .readthedocs.yaml
  5. 2021
      poetry.lock
  6. 5
      pyproject.toml
  7. 24
      tests/test_keycloak_admin.py
  8. 4
      tests/test_keycloak_openid.py

2
.github/workflows/daily.yaml

@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
keycloak-version: ["22.0", "23.0", "24.0", "25.0", "26.0", "latest"]
env:
KEYCLOAK_DOCKER_IMAGE_TAG: ${{ matrix.keycloak-version }}

8
.github/workflows/lint.yaml

@ -20,7 +20,7 @@ jobs:
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
python-version: "3.14"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
@ -40,7 +40,7 @@ jobs:
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
python-version: "3.14"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
@ -55,7 +55,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
keycloak-version: ["22.0", "23.0", "24.0", "25.0", "26.0", "latest"]
needs:
- check-commits
@ -91,7 +91,7 @@ jobs:
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
python-version: "3.14"
- name: Install dependencies
run: |
python -m pip install --upgrade pip

2
.github/workflows/publish.yaml

@ -15,7 +15,7 @@ jobs:
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
python-version: "3.14"
- name: Install dependencies
run: |
python -m pip install --upgrade pip

2
.readthedocs.yaml

@ -6,7 +6,7 @@ sphinx:
build:
os: "ubuntu-24.04"
tools:
python: "3.13"
python: "3.14"
jobs:
post_create_environment:
- python -m pip install poetry

2021
poetry.lock
File diff suppressed because it is too large
View File

5
pyproject.toml

@ -65,10 +65,7 @@ twine = ">=4.0.2"
freezegun = ">=1.2.2"
docutils = "<0.21"
ruff = ">=0.9.3"
[[tool.poetry.source]]
name = "PyPI"
priority = "primary"
backports-asyncio-runner = { "version" = ">=1.2.0", "python" = ">=3.9,<3.11" }
[build-system]
requires = ["poetry-core>=1.0.0"]

24
tests/test_keycloak_admin.py

@ -2620,7 +2620,7 @@ def test_auth_flows(admin: KeycloakAdmin, realm: str) -> None:
# Test flow executions
res = admin.get_authentication_flow_executions(flow_alias="browser")
assert len(res) in [8, 12, 14], res
assert len(res) in [8, 12, 14, 15], res
with pytest.raises(KeycloakGetError) as err:
admin.get_authentication_flow_executions(flow_alias="bad")
@ -2763,7 +2763,7 @@ def test_authentication_configs(admin: KeycloakAdmin, realm: str) -> None:
# Test list of auth providers
res = admin.get_authenticator_providers()
assert len(res) <= 41
assert len(res) <= 42
res = admin.get_authenticator_provider_config_description(provider_id="auth-cookie")
assert res == {
@ -3326,7 +3326,7 @@ def test_get_bruteforce_status_for_user(
:param realm: Keycloak realm
:type realm: str
"""
oid, username, password = oid_with_credentials
oid, username, _ = oid_with_credentials
admin.change_current_realm(realm)
# Turn on bruteforce protection
@ -3364,7 +3364,7 @@ def test_clear_bruteforce_attempts_for_user(
:param realm: Keycloak realm
:type realm: str
"""
oid, username, password = oid_with_credentials
oid, username, _ = oid_with_credentials
admin.change_current_realm(realm)
# Turn on bruteforce protection
@ -3405,7 +3405,7 @@ def test_clear_bruteforce_attempts_for_all_users(
:param realm: Keycloak realm
:type realm: str
"""
oid, username, password = oid_with_credentials
oid, username, _ = oid_with_credentials
admin.change_current_realm(realm)
# Turn on bruteforce protection
@ -3566,7 +3566,7 @@ def test_initial_access_token(
assert res["count"] == 2
assert res["expiration"] == 3
oid, username, password = oid_with_credentials
oid, _, _ = oid_with_credentials
client = str(uuid.uuid4())
secret = str(uuid.uuid4())
@ -6326,7 +6326,7 @@ async def test_a_auth_flows(admin: KeycloakAdmin, realm: str) -> None:
# Test flow executions
res = await admin.a_get_authentication_flow_executions(flow_alias="browser")
assert len(res) in [8, 12, 14], res
assert len(res) in [8, 12, 14, 15], res
with pytest.raises(KeycloakGetError) as err:
await admin.a_get_authentication_flow_executions(flow_alias="bad")
@ -6474,7 +6474,7 @@ async def test_a_authentication_configs(admin: KeycloakAdmin, realm: str) -> Non
# Test list of auth providers
res = await admin.a_get_authenticator_providers()
assert len(res) <= 41
assert len(res) <= 42
res = await admin.a_get_authenticator_provider_config_description(provider_id="auth-cookie")
assert res == {
@ -7060,7 +7060,7 @@ async def test_a_get_bruteforce_status_for_user(
:param realm: Keycloak realm
:type realm: str
"""
oid, username, password = oid_with_credentials
oid, username, _ = oid_with_credentials
await admin.a_change_current_realm(realm)
# Turn on bruteforce protection
@ -7099,7 +7099,7 @@ async def test_a_clear_bruteforce_attempts_for_user(
:param realm: Keycloak realm
:type realm: str
"""
oid, username, password = oid_with_credentials
oid, username, _ = oid_with_credentials
await admin.a_change_current_realm(realm)
# Turn on bruteforce protection
@ -7141,7 +7141,7 @@ async def test_a_clear_bruteforce_attempts_for_all_users(
:param realm: Keycloak realm
:type realm: str
"""
oid, username, password = oid_with_credentials
oid, username, _ = oid_with_credentials
await admin.a_change_current_realm(realm)
# Turn on bruteforce protection
@ -7315,7 +7315,7 @@ async def test_a_initial_access_token(
assert res["count"] == 2
assert res["expiration"] == 3
oid, username, password = oid_with_credentials
oid, _, _ = oid_with_credentials
client = str(uuid.uuid4())
secret = str(uuid.uuid4())

4
tests/test_keycloak_openid.py

@ -383,7 +383,7 @@ def test_load_authorization_config(
server with client credentials
:type oid_with_credentials_authz: Tuple[KeycloakOpenID, str, str]
"""
oid, username, password = oid_with_credentials_authz
oid, _, _ = oid_with_credentials_authz
oid.load_authorization_config(path="tests/data/authz_settings.json")
assert "test-authz-rb-policy" in oid.authorization.policies
@ -927,7 +927,7 @@ async def test_a_load_authorization_config(
server with client credentials
:type oid_with_credentials_authz: Tuple[KeycloakOpenID, str, str]
"""
oid, username, password = oid_with_credentials_authz
oid, _, _ = oid_with_credentials_authz
await oid.a_load_authorization_config(path="tests/data/authz_settings.json")
assert "test-authz-rb-policy" in oid.authorization.policies

Loading…
Cancel
Save