mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
[PR #8940/c814fd05 backport][stable-9] keycloak_userprofile: improve diff by deserializing fetched kc.user.profile.config
and serializing it before sending (#9002)
keycloak_userprofile: improve diff by deserializing fetched `kc.user.profile.config` and serializing it before sending (#8940)
* deserialize fetched `kc.user.profile.config` and serialize it before sending
* change `kc.user.profile.config` to JSON formatted string in mock `get_component` responses
* add changelog fragment
(cherry picked from commit c814fd0530
)
Co-authored-by: fgruenbauer <gruenbauer@b1-systems.de>
This commit is contained in:
parent
acdf19c9e6
commit
a1d4051a12
3 changed files with 17 additions and 7 deletions
|
@ -17,6 +17,8 @@ from ansible_collections.community.general.plugins.modules import keycloak_userp
|
|||
|
||||
from itertools import count
|
||||
|
||||
from json import dumps
|
||||
|
||||
from ansible.module_utils.six import StringIO
|
||||
|
||||
|
||||
|
@ -509,7 +511,7 @@ class TestKeycloakUserprofile(ModuleTestCase):
|
|||
"providerType": "org.keycloak.userprofile.UserProfileProvider",
|
||||
"config": {
|
||||
"kc.user.profile.config": [
|
||||
{
|
||||
dumps({
|
||||
"attributes": [
|
||||
{
|
||||
"name": "username",
|
||||
|
@ -625,7 +627,7 @@ class TestKeycloakUserprofile(ModuleTestCase):
|
|||
"displayDescription": "Attributes, which refer to user metadata",
|
||||
}
|
||||
],
|
||||
}
|
||||
})
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -714,7 +716,7 @@ class TestKeycloakUserprofile(ModuleTestCase):
|
|||
"providerType": "org.keycloak.userprofile.UserProfileProvider",
|
||||
"config": {
|
||||
"kc.user.profile.config": [
|
||||
{
|
||||
dumps({
|
||||
"attributes": [
|
||||
{
|
||||
"name": "username",
|
||||
|
@ -830,7 +832,7 @@ class TestKeycloakUserprofile(ModuleTestCase):
|
|||
"displayDescription": "Attributes, which refer to user metadata",
|
||||
}
|
||||
],
|
||||
}
|
||||
})
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue