mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-14 01:54:21 -07:00
Fixes for keycloak_user_federation (#4212)
* keycloak: fix creating a user federation w/ idempotent id Creating a user federation while specifying an id (that doesn't exist yet) will fail with a 404. This commits fix this behavior. * keycloak: fix user federation mapper duplication This commit fixes a bug where mappers are duplicated instead of configured when creating a user federation. When creating a user federation, some mappers are autogenerated by keycloak. This commit lets the keycloak_user_federation module recompute mappers final values after the user federation is created so that the module can try to merge them by their name. * add missing fragment for pr #4212
This commit is contained in:
parent
06705348e3
commit
c1485b885d
3 changed files with 27 additions and 8 deletions
|
@ -342,7 +342,7 @@ class TestKeycloakUserFederation(ModuleTestCase):
|
|||
]
|
||||
}
|
||||
return_value_components_get = [
|
||||
[]
|
||||
[], []
|
||||
]
|
||||
return_value_component_create = [
|
||||
{
|
||||
|
@ -457,7 +457,7 @@ class TestKeycloakUserFederation(ModuleTestCase):
|
|||
with self.assertRaises(AnsibleExitJson) as exec_info:
|
||||
self.module.main()
|
||||
|
||||
self.assertEqual(len(mock_get_components.mock_calls), 1)
|
||||
self.assertEqual(len(mock_get_components.mock_calls), 2)
|
||||
self.assertEqual(len(mock_get_component.mock_calls), 0)
|
||||
self.assertEqual(len(mock_create_component.mock_calls), 2)
|
||||
self.assertEqual(len(mock_update_component.mock_calls), 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue