aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/test')
-rw-r--r--app/src/test/java/org/onap/portalng/bff/BaseIntegrationTest.java4
-rw-r--r--app/src/test/java/org/onap/portalng/bff/TokenGenerator.java2
-rw-r--r--app/src/test/java/org/onap/portalng/bff/roles/ListRealmRolesIntegrationTest.java2
-rw-r--r--app/src/test/java/org/onap/portalng/bff/roles/RolesMocks.java2
-rw-r--r--app/src/test/java/org/onap/portalng/bff/users/CreateUserIntegrationTest.java16
-rw-r--r--app/src/test/java/org/onap/portalng/bff/users/DeleteUserIntegrationTest.java4
-rw-r--r--app/src/test/java/org/onap/portalng/bff/users/GetUserDetailIntegrationTest.java6
-rw-r--r--app/src/test/java/org/onap/portalng/bff/users/ListAssignedRolesIntegrationTest.java4
-rw-r--r--app/src/test/java/org/onap/portalng/bff/users/ListAvailableRolesIntegrationTest.java4
-rw-r--r--app/src/test/java/org/onap/portalng/bff/users/ListUsersIntegrationTest.java10
-rw-r--r--app/src/test/java/org/onap/portalng/bff/users/UpdateAssignedRolesIntegrationTest.java42
-rw-r--r--app/src/test/java/org/onap/portalng/bff/users/UpdateUserIntegrationTest.java8
-rw-r--r--app/src/test/java/org/onap/portalng/bff/users/UpdateUserPasswordIntegrationTest.java4
-rw-r--r--app/src/test/resources/application-development.yml6
-rw-r--r--app/src/test/resources/application.yml6
15 files changed, 60 insertions, 60 deletions
diff --git a/app/src/test/java/org/onap/portalng/bff/BaseIntegrationTest.java b/app/src/test/java/org/onap/portalng/bff/BaseIntegrationTest.java
index d90034c..1311ac7 100644
--- a/app/src/test/java/org/onap/portalng/bff/BaseIntegrationTest.java
+++ b/app/src/test/java/org/onap/portalng/bff/BaseIntegrationTest.java
@@ -87,7 +87,7 @@ public abstract class BaseIntegrationTest {
WireMock.stubFor(
WireMock.get(
WireMock.urlMatching(
- String.format("/auth/realms/%s/protocol/openid-connect/certs", realm)))
+ String.format("/realms/%s/protocol/openid-connect/certs", realm)))
.willReturn(
WireMock.aResponse()
.withHeader("Content-Type", JWKSet.MIME_TYPE)
@@ -99,7 +99,7 @@ public abstract class BaseIntegrationTest {
WireMock.stubFor(
WireMock.post(
WireMock.urlMatching(
- String.format("/auth/realms/%s/protocol/openid-connect/token", realm)))
+ String.format("/realms/%s/protocol/openid-connect/token", realm)))
.withBasicAuth("test", "test")
.withRequestBody(WireMock.containing("grant_type=client_credentials"))
.willReturn(
diff --git a/app/src/test/java/org/onap/portalng/bff/TokenGenerator.java b/app/src/test/java/org/onap/portalng/bff/TokenGenerator.java
index 051129f..0c6aa89 100644
--- a/app/src/test/java/org/onap/portalng/bff/TokenGenerator.java
+++ b/app/src/test/java/org/onap/portalng/bff/TokenGenerator.java
@@ -116,7 +116,7 @@ public class TokenGenerator {
@Builder.Default private final List<String> roles = Collections.emptyList();
public String issuer() {
- return String.format("http://localhost:%d/auth/realms/%s", port, realm);
+ return String.format("http://localhost:%d/realms/%s", port, realm);
}
}
}
diff --git a/app/src/test/java/org/onap/portalng/bff/roles/ListRealmRolesIntegrationTest.java b/app/src/test/java/org/onap/portalng/bff/roles/ListRealmRolesIntegrationTest.java
index d9a69f1..d9fa9e0 100644
--- a/app/src/test/java/org/onap/portalng/bff/roles/ListRealmRolesIntegrationTest.java
+++ b/app/src/test/java/org/onap/portalng/bff/roles/ListRealmRolesIntegrationTest.java
@@ -59,7 +59,7 @@ class ListRealmRolesIntegrationTest extends RolesMocks {
new ErrorResponseKeycloakDto().errorMessage("Some error message");
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)
diff --git a/app/src/test/java/org/onap/portalng/bff/roles/RolesMocks.java b/app/src/test/java/org/onap/portalng/bff/roles/RolesMocks.java
index b29ad7c..2f61995 100644
--- a/app/src/test/java/org/onap/portalng/bff/roles/RolesMocks.java
+++ b/app/src/test/java/org/onap/portalng/bff/roles/RolesMocks.java
@@ -48,7 +48,7 @@ public class RolesMocks 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)
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)
diff --git a/app/src/test/java/org/onap/portalng/bff/users/DeleteUserIntegrationTest.java b/app/src/test/java/org/onap/portalng/bff/users/DeleteUserIntegrationTest.java
index 11076d4..15ba9ee 100644
--- a/app/src/test/java/org/onap/portalng/bff/users/DeleteUserIntegrationTest.java
+++ b/app/src/test/java/org/onap/portalng/bff/users/DeleteUserIntegrationTest.java
@@ -37,7 +37,7 @@ class DeleteUserIntegrationTest extends BaseIntegrationTest {
@Test
void userCanBeDeleted() {
WireMock.stubFor(
- WireMock.delete(WireMock.urlMatching(String.format("/auth/admin/realms/%s/users/1", realm)))
+ WireMock.delete(WireMock.urlMatching(String.format("/admin/realms/%s/users/1", realm)))
.willReturn(WireMock.aResponse().withStatus(204)));
requestSpecification()
@@ -55,7 +55,7 @@ class DeleteUserIntegrationTest extends BaseIntegrationTest {
new ErrorResponseKeycloakDto().errorMessage("Some error message");
WireMock.stubFor(
- WireMock.delete(WireMock.urlMatching(String.format("/auth/admin/realms/%s/users/1", realm)))
+ WireMock.delete(WireMock.urlMatching(String.format("/admin/realms/%s/users/1", realm)))
.willReturn(
WireMock.aResponse()
.withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
diff --git a/app/src/test/java/org/onap/portalng/bff/users/GetUserDetailIntegrationTest.java b/app/src/test/java/org/onap/portalng/bff/users/GetUserDetailIntegrationTest.java
index 7360a63..6766af8 100644
--- a/app/src/test/java/org/onap/portalng/bff/users/GetUserDetailIntegrationTest.java
+++ b/app/src/test/java/org/onap/portalng/bff/users/GetUserDetailIntegrationTest.java
@@ -46,7 +46,7 @@ class GetUserDetailIntegrationTest extends BaseIntegrationTest {
new UserKeycloakDto().id("1").username("user1").email("user1@localhost").enabled(true);
WireMock.stubFor(
- WireMock.get(WireMock.urlMatching(String.format("/auth/admin/realms/%s/users/1", realm)))
+ WireMock.get(WireMock.urlMatching(String.format("/admin/realms/%s/users/1", realm)))
.willReturn(
WireMock.aResponse()
.withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
@@ -85,7 +85,7 @@ class GetUserDetailIntegrationTest extends BaseIntegrationTest {
new ErrorResponseKeycloakDto().errorMessage("Some error message");
WireMock.stubFor(
- WireMock.get(WireMock.urlMatching(String.format("/auth/admin/realms/%s/users/1", realm)))
+ WireMock.get(WireMock.urlMatching(String.format("/admin/realms/%s/users/1", realm)))
.willReturn(
WireMock.aResponse()
.withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)
@@ -118,7 +118,7 @@ class GetUserDetailIntegrationTest 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)
diff --git a/app/src/test/java/org/onap/portalng/bff/users/ListAssignedRolesIntegrationTest.java b/app/src/test/java/org/onap/portalng/bff/users/ListAssignedRolesIntegrationTest.java
index 7ab1130..901308c 100644
--- a/app/src/test/java/org/onap/portalng/bff/users/ListAssignedRolesIntegrationTest.java
+++ b/app/src/test/java/org/onap/portalng/bff/users/ListAssignedRolesIntegrationTest.java
@@ -47,7 +47,7 @@ class ListAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.stubFor(
WireMock.get(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/users/1/role-mappings/realm", realm)))
+ String.format("/admin/realms/%s/users/1/role-mappings/realm", realm)))
.willReturn(
WireMock.aResponse()
.withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
@@ -82,7 +82,7 @@ class ListAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.stubFor(
WireMock.get(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/users/1/role-mappings/realm", realm)))
+ String.format("/admin/realms/%s/users/1/role-mappings/realm", realm)))
.willReturn(
WireMock.aResponse()
.withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
diff --git a/app/src/test/java/org/onap/portalng/bff/users/ListAvailableRolesIntegrationTest.java b/app/src/test/java/org/onap/portalng/bff/users/ListAvailableRolesIntegrationTest.java
index 45290da..d8fb3c7 100644
--- a/app/src/test/java/org/onap/portalng/bff/users/ListAvailableRolesIntegrationTest.java
+++ b/app/src/test/java/org/onap/portalng/bff/users/ListAvailableRolesIntegrationTest.java
@@ -48,7 +48,7 @@ class ListAvailableRolesIntegrationTest extends BaseIntegrationTest {
WireMock.get(
WireMock.urlMatching(
String.format(
- "/auth/admin/realms/%s/users/1/role-mappings/realm/available", realm)))
+ "/admin/realms/%s/users/1/role-mappings/realm/available", realm)))
.willReturn(
WireMock.aResponse()
.withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
@@ -84,7 +84,7 @@ class ListAvailableRolesIntegrationTest extends BaseIntegrationTest {
WireMock.get(
WireMock.urlMatching(
String.format(
- "/auth/admin/realms/%s/users/1/role-mappings/realm/available", realm)))
+ "/admin/realms/%s/users/1/role-mappings/realm/available", realm)))
.willReturn(
WireMock.aResponse()
.withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
diff --git a/app/src/test/java/org/onap/portalng/bff/users/ListUsersIntegrationTest.java b/app/src/test/java/org/onap/portalng/bff/users/ListUsersIntegrationTest.java
index cad6697..d4d74da 100644
--- a/app/src/test/java/org/onap/portalng/bff/users/ListUsersIntegrationTest.java
+++ b/app/src/test/java/org/onap/portalng/bff/users/ListUsersIntegrationTest.java
@@ -163,7 +163,7 @@ class ListUsersIntegrationTest extends BaseIntegrationTest {
protected void mockGetUserCount(Integer userCount) {
WireMock.stubFor(
WireMock.get(
- WireMock.urlMatching(String.format("/auth/admin/realms/%s/users/count", realm)))
+ WireMock.urlMatching(String.format("/admin/realms/%s/users/count", realm)))
.willReturn(
WireMock.aResponse()
.withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
@@ -176,7 +176,7 @@ class ListUsersIntegrationTest extends BaseIntegrationTest {
WireMock.get(
WireMock.urlMatching(
String.format(
- "/auth/admin/realms/%s/users\\?first=%s&max=%s", realm, first, max)))
+ "/admin/realms/%s/users\\?first=%s&max=%s", realm, first, max)))
.willReturn(
WireMock.aResponse()
.withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
@@ -185,7 +185,7 @@ class ListUsersIntegrationTest 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)
@@ -197,7 +197,7 @@ class ListUsersIntegrationTest extends BaseIntegrationTest {
WireMock.stubFor(
WireMock.get(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/roles/%s/users", realm, roleName)))
+ String.format("/admin/realms/%s/roles/%s/users", realm, roleName)))
.willReturn(
WireMock.aResponse()
.withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
@@ -228,7 +228,7 @@ class ListUsersIntegrationTest extends BaseIntegrationTest {
WireMock.get(
WireMock.urlMatching(
String.format(
- "/auth/admin/realms/%s/users\\?first=%s&max=%s", realm, first, max)))
+ "/admin/realms/%s/users\\?first=%s&max=%s", realm, first, max)))
.willReturn(
WireMock.aResponse()
.withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
diff --git a/app/src/test/java/org/onap/portalng/bff/users/UpdateAssignedRolesIntegrationTest.java b/app/src/test/java/org/onap/portalng/bff/users/UpdateAssignedRolesIntegrationTest.java
index 8f7b350..a69e969 100644
--- a/app/src/test/java/org/onap/portalng/bff/users/UpdateAssignedRolesIntegrationTest.java
+++ b/app/src/test/java/org/onap/portalng/bff/users/UpdateAssignedRolesIntegrationTest.java
@@ -55,7 +55,7 @@ class UpdateAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.get(
WireMock.urlMatching(
String.format(
- "/auth/admin/realms/%s/users/1/role-mappings/realm/available", realm)))
+ "/admin/realms/%s/users/1/role-mappings/realm/available", realm)))
.inScenario("test")
.whenScenarioStateIs(Scenario.STARTED)
.willReturn(
@@ -66,7 +66,7 @@ class UpdateAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.stubFor(
WireMock.get(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/users/1/role-mappings/realm", realm)))
+ String.format("/admin/realms/%s/users/1/role-mappings/realm", realm)))
.inScenario("test")
.whenScenarioStateIs(Scenario.STARTED)
.willReturn(
@@ -77,7 +77,7 @@ class UpdateAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.stubFor(
WireMock.post(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/users/1/role-mappings/realm", realm)))
+ String.format("/admin/realms/%s/users/1/role-mappings/realm", realm)))
.inScenario("test")
.whenScenarioStateIs(Scenario.STARTED)
.withRequestBody(WireMock.equalTo(objectMapper.writeValueAsString(keycloakRolesToAdd)))
@@ -87,7 +87,7 @@ class UpdateAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.stubFor(
WireMock.get(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/users/1/role-mappings/realm", realm)))
+ String.format("/admin/realms/%s/users/1/role-mappings/realm", realm)))
.inScenario("test")
.whenScenarioStateIs("rolesUpdated")
.willReturn(
@@ -139,7 +139,7 @@ class UpdateAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.get(
WireMock.urlMatching(
String.format(
- "/auth/admin/realms/%s/users/1/role-mappings/realm/available", realm)))
+ "/admin/realms/%s/users/1/role-mappings/realm/available", realm)))
.inScenario("test")
.whenScenarioStateIs(Scenario.STARTED)
.willReturn(
@@ -150,7 +150,7 @@ class UpdateAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.stubFor(
WireMock.get(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/users/1/role-mappings/realm", realm)))
+ String.format("/admin/realms/%s/users/1/role-mappings/realm", realm)))
.inScenario("test")
.whenScenarioStateIs(Scenario.STARTED)
.willReturn(
@@ -161,7 +161,7 @@ class UpdateAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.stubFor(
WireMock.delete(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/users/1/role-mappings/realm", realm)))
+ String.format("/admin/realms/%s/users/1/role-mappings/realm", realm)))
.inScenario("test")
.whenScenarioStateIs(Scenario.STARTED)
.withRequestBody(
@@ -171,7 +171,7 @@ class UpdateAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.stubFor(
WireMock.post(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/users/1/role-mappings/realm", realm)))
+ String.format("/admin/realms/%s/users/1/role-mappings/realm", realm)))
.inScenario("test")
.whenScenarioStateIs(Scenario.STARTED)
.withRequestBody(WireMock.equalTo(objectMapper.writeValueAsString(keycloakRolesToAdd)))
@@ -181,7 +181,7 @@ class UpdateAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.stubFor(
WireMock.get(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/users/1/role-mappings/realm", realm)))
+ String.format("/admin/realms/%s/users/1/role-mappings/realm", realm)))
.inScenario("test")
.whenScenarioStateIs("rolesUpdated")
.willReturn(
@@ -227,7 +227,7 @@ class UpdateAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.get(
WireMock.urlMatching(
String.format(
- "/auth/admin/realms/%s/users/1/role-mappings/realm/available", realm)))
+ "/admin/realms/%s/users/1/role-mappings/realm/available", realm)))
.willReturn(
WireMock.aResponse()
.withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
@@ -236,7 +236,7 @@ class UpdateAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.stubFor(
WireMock.delete(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/users/1/role-mappings/realm", realm)))
+ String.format("/admin/realms/%s/users/1/role-mappings/realm", realm)))
.withRequestBody(
WireMock.equalTo(objectMapper.writeValueAsString(keycloakRolesToRemove)))
.willReturn(WireMock.aResponse().withStatus(HttpStatus.NO_CONTENT.value())));
@@ -244,7 +244,7 @@ class UpdateAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.stubFor(
WireMock.get(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/users/1/role-mappings/realm", realm)))
+ String.format("/admin/realms/%s/users/1/role-mappings/realm", realm)))
.willReturn(
WireMock.aResponse()
.withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)
@@ -289,7 +289,7 @@ class UpdateAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.get(
WireMock.urlMatching(
String.format(
- "/auth/admin/realms/%s/users/1/role-mappings/realm/available", realm)))
+ "/admin/realms/%s/users/1/role-mappings/realm/available", realm)))
.inScenario("test")
.whenScenarioStateIs(Scenario.STARTED)
.willReturn(
@@ -300,7 +300,7 @@ class UpdateAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.stubFor(
WireMock.get(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/users/1/role-mappings/realm", realm)))
+ String.format("/admin/realms/%s/users/1/role-mappings/realm", realm)))
.inScenario("test")
.whenScenarioStateIs(Scenario.STARTED)
.willReturn(
@@ -311,7 +311,7 @@ class UpdateAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.stubFor(
WireMock.post(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/users/1/role-mappings/realm", realm)))
+ String.format("/admin/realms/%s/users/1/role-mappings/realm", realm)))
.inScenario("test")
.whenScenarioStateIs(Scenario.STARTED)
.withRequestBody(WireMock.equalTo(objectMapper.writeValueAsString(keycloakRolesToAdd)))
@@ -321,7 +321,7 @@ class UpdateAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.stubFor(
WireMock.get(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/users/1/role-mappings/realm", realm)))
+ String.format("/admin/realms/%s/users/1/role-mappings/realm", realm)))
.inScenario("test")
.whenScenarioStateIs("rolesUpdated")
.willReturn(
@@ -375,7 +375,7 @@ class UpdateAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.get(
WireMock.urlMatching(
String.format(
- "/auth/admin/realms/%s/users/1/role-mappings/realm/available", realm)))
+ "/admin/realms/%s/users/1/role-mappings/realm/available", realm)))
.inScenario("test")
.whenScenarioStateIs(Scenario.STARTED)
.willReturn(
@@ -386,7 +386,7 @@ class UpdateAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.stubFor(
WireMock.get(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/users/1/role-mappings/realm", realm)))
+ String.format("/admin/realms/%s/users/1/role-mappings/realm", realm)))
.inScenario("test")
.whenScenarioStateIs(Scenario.STARTED)
.willReturn(
@@ -398,7 +398,7 @@ class UpdateAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.stubFor(
WireMock.delete(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/users/1/role-mappings/realm", realm)))
+ String.format("/admin/realms/%s/users/1/role-mappings/realm", realm)))
.inScenario("test")
.whenScenarioStateIs(Scenario.STARTED)
.withRequestBody(
@@ -408,7 +408,7 @@ class UpdateAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.stubFor(
WireMock.post(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/users/1/role-mappings/realm", realm)))
+ String.format("/admin/realms/%s/users/1/role-mappings/realm", realm)))
.inScenario("test")
.whenScenarioStateIs(Scenario.STARTED)
.withRequestBody(WireMock.equalTo(objectMapper.writeValueAsString(keycloakRolesToAdd)))
@@ -418,7 +418,7 @@ class UpdateAssignedRolesIntegrationTest extends BaseIntegrationTest {
WireMock.stubFor(
WireMock.get(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/users/1/role-mappings/realm", realm)))
+ String.format("/admin/realms/%s/users/1/role-mappings/realm", realm)))
.inScenario("test")
.whenScenarioStateIs("rolesUpdated")
.willReturn(
diff --git a/app/src/test/java/org/onap/portalng/bff/users/UpdateUserIntegrationTest.java b/app/src/test/java/org/onap/portalng/bff/users/UpdateUserIntegrationTest.java
index 0cce10a..3ce7d8b 100644
--- a/app/src/test/java/org/onap/portalng/bff/users/UpdateUserIntegrationTest.java
+++ b/app/src/test/java/org/onap/portalng/bff/users/UpdateUserIntegrationTest.java
@@ -66,7 +66,7 @@ class UpdateUserIntegrationTest extends BaseIntegrationTest {
final UserKeycloakDto keycloakRequest = new UserKeycloakDto().firstName("User1").enabled(false);
WireMock.stubFor(
- WireMock.put(WireMock.urlMatching(String.format("/auth/admin/realms/%s/users/1", realm)))
+ WireMock.put(WireMock.urlMatching(String.format("/admin/realms/%s/users/1", realm)))
.withRequestBody(WireMock.equalTo(objectMapper.writeValueAsString(keycloakRequest)))
.willReturn(
WireMock.aResponse()
@@ -102,7 +102,7 @@ class UpdateUserIntegrationTest extends BaseIntegrationTest {
WireMock.stubFor(
WireMock.put(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/users/%s", realm, userId)))
+ String.format("/admin/realms/%s/users/%s", realm, userId)))
.withRequestBody(WireMock.equalTo(objectMapper.writeValueAsString(request)))
.willReturn(
WireMock.aResponse().withHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE)));
@@ -112,7 +112,7 @@ class UpdateUserIntegrationTest extends BaseIntegrationTest {
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)
@@ -125,7 +125,7 @@ class UpdateUserIntegrationTest 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)
diff --git a/app/src/test/java/org/onap/portalng/bff/users/UpdateUserPasswordIntegrationTest.java b/app/src/test/java/org/onap/portalng/bff/users/UpdateUserPasswordIntegrationTest.java
index cd38aeb..11634a8 100644
--- a/app/src/test/java/org/onap/portalng/bff/users/UpdateUserPasswordIntegrationTest.java
+++ b/app/src/test/java/org/onap/portalng/bff/users/UpdateUserPasswordIntegrationTest.java
@@ -44,7 +44,7 @@ class UpdateUserPasswordIntegrationTest extends BaseIntegrationTest {
WireMock.stubFor(
WireMock.put(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/users/1/reset-password", realm)))
+ String.format("/admin/realms/%s/users/1/reset-password", realm)))
.withRequestBody(WireMock.equalTo(objectMapper.writeValueAsString(keycloakRequest)))
.willReturn(WireMock.aResponse().withStatus(204)));
@@ -73,7 +73,7 @@ class UpdateUserPasswordIntegrationTest extends BaseIntegrationTest {
WireMock.stubFor(
WireMock.put(
WireMock.urlMatching(
- String.format("/auth/admin/realms/%s/users/1/reset-password", realm)))
+ String.format("/admin/realms/%s/users/1/reset-password", realm)))
.withRequestBody(WireMock.equalTo(objectMapper.writeValueAsString(keycloakRequest)))
.willReturn(
WireMock.aResponse()
diff --git a/app/src/test/resources/application-development.yml b/app/src/test/resources/application-development.yml
index 2d53583..23602d1 100644
--- a/app/src/test/resources/application-development.yml
+++ b/app/src/test/resources/application-development.yml
@@ -10,8 +10,8 @@ spring:
client:
provider:
keycloak:
- token-uri: http://localhost:${wiremock.server.port}/auth/realms/ONAP/protocol/openid-connect/token
- jwk-set-uri: http://localhost:${wiremock.server.port}/auth/realms/ONAP/protocol/openid-connect/certs
+ token-uri: http://localhost:${wiremock.server.port}/realms/ONAP/protocol/openid-connect/token
+ jwk-set-uri: http://localhost:${wiremock.server.port}/realms/ONAP/protocol/openid-connect/certs
registration:
keycloak:
provider: keycloak
@@ -20,7 +20,7 @@ spring:
authorization-grant-type: client_credentials
resourceserver:
jwt:
- jwk-set-uri: http://localhost:${wiremock.server.port}/auth/realms/ONAP/protocol/openid-connect/certs
+ jwk-set-uri: http://localhost:${wiremock.server.port}/realms/ONAP/protocol/openid-connect/certs
jackson:
serialization:
FAIL_ON_EMPTY_BEANS: false
diff --git a/app/src/test/resources/application.yml b/app/src/test/resources/application.yml
index 789e870..3e423e4 100644
--- a/app/src/test/resources/application.yml
+++ b/app/src/test/resources/application.yml
@@ -11,8 +11,8 @@ spring:
client:
provider:
keycloak:
- token-uri: http://localhost:${wiremock.server.port}/auth/realms/ONAP/protocol/openid-connect/token
- jwk-set-uri: http://localhost:${wiremock.server.port}/auth/realms/ONAP/protocol/openid-connect/certs
+ token-uri: http://localhost:${wiremock.server.port}/realms/ONAP/protocol/openid-connect/token
+ jwk-set-uri: http://localhost:${wiremock.server.port}/realms/ONAP/protocol/openid-connect/certs
registration:
keycloak:
provider: keycloak
@@ -21,7 +21,7 @@ spring:
authorization-grant-type: client_credentials
resourceserver:
jwt:
- jwk-set-uri: http://localhost:${wiremock.server.port}/auth/realms/ONAP/protocol/openid-connect/certs
+ jwk-set-uri: http://localhost:${wiremock.server.port}/realms/ONAP/protocol/openid-connect/certs
jackson:
serialization:
FAIL_ON_EMPTY_BEANS: false