initial version of the client v2 policy test#46029
Conversation
6b96f53 to
3bddb51
Compare
fixes: keycloak#46074 Signed-off-by: Erik Jan de Wit <[email protected]>
|
@mabartos done, reworded the commit |
Signed-off-by: Martin Bartoš <[email protected]>
| @AfterEach | ||
| public void cleanup() throws Exception { | ||
| // Clean up any test clients | ||
| cleanupClient("test-policy-client"); |
There was a problem hiding this comment.
It'd be nice to have ManagedRealm for these cases, as we might not care about these cleanups. However, I had some problems to have master realm managed (even with the attachTo) and custom admin clients.
On the other hand, we directly test the master realm, so the test coverage might be a little bit higher.
These test improvements can be done in a follow-up tasks with the help of guys working on the testsuite.
So, it's ok to me as is for now.
rest/admin-v2/tests/src/test/java/org/keycloak/tests/admin/client/v2/ClientPoliciesV2Test.java
Show resolved
Hide resolved
| * when a policy requires specific authenticators. | ||
| */ | ||
| @Test | ||
| public void testCreateClientWithUnacceptableAuthType() throws Exception { |
There was a problem hiding this comment.
@edewit nitpick: it'd be good to not use the prefix "test", as it does not add any added value and is considered as old JUnit approach.
Extract client profile/policy to dedicated method
Signed-off-by: Erik Jan de Wit <[email protected]>
related to #45932
fixes: #46074