Conversation
|
I will add tests next. |
1ee89de to
e5dc537
Compare
|
The tests be good to add is unit test for provider and more importantly the acceptance tests. The code changes look good. |
|
Acceptance tests added. As getting role mappings for users and groups took more than one command I created a Ruby wrapper script that provides role mappings in a format the tests can easily use. |
|
I'll look into the provider tests this week. I've never had to implement them, so wish me luck :). |
This is required for cases where a JSON file is not passed in as input. Some examples are get-roles and add-roles. Signed-off-by: Samuli Seppänen <samuli.seppanen@puppeteers.net>
This new type allows attaching client and realm roles into users and groups. Using the normal JSON payload approach ended up being overly complex as well as much less performant than this simplistic approach. Signed-off-by: Samuli Seppänen <samuli.seppanen@puppeteers.net>
Signed-off-by: Samuli Seppänen <samuli.seppanen@puppeteers.net>
Signed-off-by: Samuli Seppänen <samuli.seppanen@puppeteers.net>
This is required for provider tests because the realm_roles method has to be mocked, which means the instance variable won't be populated at all. Signed-off-by: Samuli Seppänen <samuli.seppanen@puppeteers.net>
Signed-off-by: Samuli Seppänen <samuli.seppanen@puppeteers.net>
cf4d691 to
717be8a
Compare
|
Simple provider tests added. I've never written any before, so feedback is welcome. But at least the relevant codepaths (imho) are being exercised. I had to make a minor change to the provider code to make the tests work, but it should not have any behavioral impact. |
|
@mattock Thanks! This will be released as v7.13.0 once Github Actions complete. |
This is simplified version of the earlier PR (#175). All it does is add realm role mapping support for users and groups.