Browse Source

chore: update master

pull/373/head
Richard Nemeth 2 years ago
parent
commit
cb2bab003e
  1. 8
      test_keycloak_init.sh
  2. 4
      tests/test_keycloak_admin.py

8
test_keycloak_init.sh

@ -4,8 +4,11 @@ CMD_ARGS=$1
KEYCLOAK_DOCKER_IMAGE="quay.io/keycloak/keycloak:latest"
function keycloak_stop() {
docker stop unittest_keycloak &> /dev/null
docker rm unittest_keycloak &> /dev/null
if [ "$(docker ps -q -f name=unittest_keycloak)" ]; then
docker logs unittest_keycloak > keycloak_test_logs.txt
docker stop unittest_keycloak &> /dev/null
docker rm unittest_keycloak &> /dev/null
fi
}
function keycloak_start() {
@ -29,6 +32,5 @@ keycloak_start
eval ${CMD_ARGS}
RETURN_VALUE=$?
docker logs unittest_keycloak > keycloak_test_logs.txt
exit ${RETURN_VALUE}

4
tests/test_keycloak_admin.py

@ -759,7 +759,6 @@ def test_clients(admin: KeycloakAdmin, realm: str):
res = admin.get_client_authz_policies(client_id=auth_client_id)
assert len(res) == 1, res
assert res[0]["name"] == "Default Policy"
assert len(admin.get_client_authz_policies(client_id=client_id)) == 1
with pytest.raises(KeycloakGetError) as err:
admin.get_client_authz_policies(client_id="does-not-exist")
@ -789,7 +788,6 @@ def test_clients(admin: KeycloakAdmin, realm: str):
res = admin.get_client_authz_permissions(client_id=auth_client_id)
assert len(res) == 1, res
assert res[0]["name"] == "Default Permission"
assert len(admin.get_client_authz_permissions(client_id=client_id)) == 1
with pytest.raises(KeycloakGetError) as err:
admin.get_client_authz_permissions(client_id="does-not-exist")
@ -1478,7 +1476,7 @@ def test_authentication_configs(admin: KeycloakAdmin, realm: str):
# Test list of auth providers
res = admin.get_authenticator_providers()
assert len(res) == 39
assert len(res) == 38
res = admin.get_authenticator_provider_config_description(provider_id="auth-cookie")
assert res == {

Loading…
Cancel
Save