aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/test/java/org/onap/portalng/bff/users/CreateUserIntegrationTest.java
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-04-11 13:57:10 +0200
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-04-11 13:57:10 +0200
commitdd5bbdc4704b91be74cc57be584efd9db99ee5c0 (patch)
tree8685d75472620769ddd43c3d066477287960b47b /app/src/test/java/org/onap/portalng/bff/users/CreateUserIntegrationTest.java
parent0bf11185dcf93394c600972a83dbe69f9014e521 (diff)
Remove hardcoded /auth from the keycloak urls in bff
- it should be possible not to configure /auth in the Keycloak url since newer versions do not use it Issue-ID: PORTALNG-85 Change-Id: I288c8b954db185ed22793db0107d14e314d17c26 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'app/src/test/java/org/onap/portalng/bff/users/CreateUserIntegrationTest.java')
-rw-r--r--app/src/test/java/org/onap/portalng/bff/users/CreateUserIntegrationTest.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/app/src/test/java/org/onap/portalng/bff/users/CreateUserIntegrationTest.java b/app/src/test/java/org/onap/portalng/bff/users/CreateUserIntegrationTest.java
index c22f937..bfc868d 100644
--- a/app/src/test/java/org/onap/portalng/bff/users/CreateUserIntegrationTest.java
+++ b/app/src/test/java/org/onap/portalng/bff/users/CreateUserIntegrationTest.java
@@ -220,21 +220,21 @@ class CreateUserIntegrationTest extends BaseIntegrationTest {
protected void mockCreateUser(UserKeycloakDto request, String userId) throws Exception {
WireMock.stubFor(
- WireMock.post(WireMock.urlMatching(String.format("/auth/admin/realms/%s/users", realm)))
+ WireMock.post(WireMock.urlMatching(String.format("/admin/realms/%s/users", realm)))
.withRequestBody(WireMock.equalToJson(objectMapper.writeValueAsString(request)))
.willReturn(
WireMock.aResponse()
.withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
.withHeader(
"location",
- String.format("/auth/admin/realms/%s/users/%s", realm, userId))));
+ String.format("/admin/realms/%s/users/%s", realm, userId))));
}
protected void mockGetUser(String userId, UserKeycloakDto response) throws Exception {
WireMock.stubFor(
WireMock.get(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/users/%s", realm, userId)))
+ String.format("/admin/realms/%s/users/%s", realm, userId)))
.willReturn(
WireMock.aResponse()
.withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
@@ -246,7 +246,7 @@ class CreateUserIntegrationTest extends BaseIntegrationTest {
WireMock.post(
WireMock.urlMatching(
String.format(
- "/auth/admin/realms/%s/users/%s/role-mappings/realm", realm, userId)))
+ "/admin/realms/%s/users/%s/role-mappings/realm", realm, userId)))
.willReturn(
WireMock.aResponse()
.withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
@@ -262,7 +262,7 @@ class CreateUserIntegrationTest extends BaseIntegrationTest {
WireMock.put(
WireMock.urlMatching(
String.format(
- "/auth/admin/realms/%s/users/%s/execute-actions-email", realm, userId)))
+ "/admin/realms/%s/users/%s/execute-actions-email", realm, userId)))
.withRequestBody(WireMock.equalTo(objectMapper.writeValueAsString(request)))
.willReturn(
WireMock.aResponse()
@@ -277,7 +277,7 @@ class CreateUserIntegrationTest extends BaseIntegrationTest {
WireMock.get(
WireMock.urlMatching(
String.format(
- "/auth/admin/realms/%s/users/%s/role-mappings/realm", realm, userID)))
+ "/admin/realms/%s/users/%s/role-mappings/realm", realm, userID)))
.willReturn(
WireMock.aResponse()
.withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
@@ -290,7 +290,7 @@ class CreateUserIntegrationTest extends BaseIntegrationTest {
WireMock.put(
WireMock.urlMatching(
String.format(
- "/auth/admin/realms/%s/users/%s/execute-actions-email", realm, userId)))
+ "/admin/realms/%s/users/%s/execute-actions-email", realm, userId)))
.withRequestBody(WireMock.equalTo(objectMapper.writeValueAsString(request)))
.willReturn(
WireMock.aResponse().withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)));
@@ -298,7 +298,7 @@ class CreateUserIntegrationTest extends BaseIntegrationTest {
protected void mockListRealmRoles(List<RoleKeycloakDto> roles) throws Exception {
WireMock.stubFor(
- WireMock.get(WireMock.urlMatching(String.format("/auth/admin/realms/%s/roles", realm)))
+ WireMock.get(WireMock.urlMatching(String.format("/admin/realms/%s/roles", realm)))
.willReturn(
WireMock.aResponse()
.withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)