mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-06 18:50:31 -07:00
keycloak: repair integration tests by removing jinja2 templating from conditionals (#9726) (#9727)
* fix: remove jinja2 templating from conditionals in keycloak_role module integration tests (#9726)
* fix: remove jinja2 templating in conditional in keycloak clientsecret info integration test (#9726)
This test needs a further fix; see #9744. Left for a future PR for now.
* fix: remove jinja2 templating in conditional in keycloak clientsecret regenerate integration test (#9726)
* chore: remove jinja2 templating in conditional in keycloak user federation integration test (#9726)
These instances of templating were not causing failures,
but this removes the warnings.
* chore: remove jinja2 templating in conditional in keycloak user rolemapping integration test (#9726)
These instances of templating were not causing failures,
but this removes the warnings.
* docs: add changelog fragment (#9726)
* docs: repair changelog fragment yaml (#9726)
* docs: actually repair changelog fragment yaml (#9726)
* chore: remove changelog fragment for test only pr (#9726)
(cherry picked from commit 910c57aaa0
)
Co-authored-by: Mark Armstrong <markparmstrong@gmail.com>
48 lines
1.5 KiB
YAML
48 lines
1.5 KiB
YAML
---
|
|
# Copyright (c) Ansible Project
|
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
- name: Create realm
|
|
community.general.keycloak_realm: "{{ auth_args | combine(call_args) }}"
|
|
vars:
|
|
call_args:
|
|
id: "{{ realm }}"
|
|
realm: "{{ realm }}"
|
|
state: present
|
|
|
|
- name: Keycloak Client
|
|
community.general.keycloak_client: "{{ auth_args | combine(call_args) }}"
|
|
vars:
|
|
call_args:
|
|
realm: "{{ realm }}"
|
|
client_id: "{{ client_id }}"
|
|
state: present
|
|
register: client
|
|
|
|
- name: Keycloak Client fetch clientsecret by client_id
|
|
community.general.keycloak_clientsecret_info: "{{ auth_args | combine(call_args) }}"
|
|
vars:
|
|
call_args:
|
|
realm: "{{ realm }}"
|
|
client_id: "{{ client_id }}"
|
|
register: fetch_by_client_id_result
|
|
|
|
- name: Assert that the client secret was retrieved
|
|
assert:
|
|
that:
|
|
- fetch_by_client_id_result.clientsecret_info.type == "secret"
|
|
- fetch_by_client_id_result.clientsecret_info.value | length >= 32
|
|
|
|
- name: Keycloak Client fetch clientsecret by id
|
|
community.general.keycloak_clientsecret_info: "{{ auth_args | combine(call_args) }}"
|
|
vars:
|
|
call_args:
|
|
realm: "{{ realm }}"
|
|
id: "{{ client.end_state.id }}"
|
|
register: fetch_by_id_result
|
|
|
|
- name: Assert that the same client secret was retrieved both times
|
|
assert:
|
|
that:
|
|
- fetch_by_id_result.clientsecret_info.value == fetch_by_client_id_result.clientsecret_info.value
|