diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ScopesTestCase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ScopesTestCase.java index cd95ec312f..0bee921144 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ScopesTestCase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ScopesTestCase.java @@ -58,7 +58,8 @@ public class OAuth2ScopesTestCase extends ISIntegrationTest { public void testInit() throws Exception { super.init(); String isServerBackendUrl = isServer.getContextUrls().getWebAppURLHttps(); - scopeEndpoint = isServerBackendUrl + "/t/" + isServer.getContextTenant().getDomain() + SCOPE_ENDPOINT_SUFFIX; + scopeEndpoint = isServerBackendUrl + + getTenantedRelativePath(SCOPE_ENDPOINT_SUFFIX, isServer.getContextTenant().getDomain()); } @AfterClass(alwaysRun = true) diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/common/RESTTestBase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/common/RESTTestBase.java index 2c1d7a560a..a6cb31dbaa 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/common/RESTTestBase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/common/RESTTestBase.java @@ -79,7 +79,6 @@ public class RESTTestBase extends ISIntegrationTest { + File.separator + "deployment" + File.separator + "server" + File.separator + "webapps" + File .separator + "api" + File.separator + "WEB-INF" + File.separator + "lib" + File.separator; - protected static final String TENANT_CONTEXT_IN_URL = "/t/%s"; private static final String JAR_EXTENSION = ".jar"; protected static final String SERVICES = "/services"; diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/common/RESTAPIServerTestBase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/common/RESTAPIServerTestBase.java index 4336169a84..85f69b8653 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/common/RESTAPIServerTestBase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/common/RESTAPIServerTestBase.java @@ -17,6 +17,7 @@ package org.wso2.identity.integration.test.rest.api.server.common; import org.apache.axis2.AxisFault; +import org.wso2.identity.integration.common.utils.ISIntegrationTest; import org.wso2.identity.integration.test.rest.api.common.RESTTestBase; import java.rmi.RemoteException; @@ -29,15 +30,13 @@ public class RESTAPIServerTestBase extends RESTTestBase { protected static final String API_SERVER_BASE_PATH = "/api/server/%s"; protected static final String API_SERVER_BASE_PATH_IN_SWAGGER = "/t/\\{tenant-domain\\}" + API_SERVER_BASE_PATH; - protected static final String API_SERVER_BASE_PATH_WITH_TENANT_CONTEXT = - TENANT_CONTEXT_IN_URL + API_SERVER_BASE_PATH; protected void testInit(String apiVersion, String apiDefinition, String tenantDomain) throws RemoteException { String basePathInSwagger = String.format(API_SERVER_BASE_PATH_IN_SWAGGER, apiVersion); - String basePath = String.format(API_SERVER_BASE_PATH_WITH_TENANT_CONTEXT, - tenantDomain, apiVersion); + String basePath = ISIntegrationTest.getTenantedRelativePath(String.format(API_SERVER_BASE_PATH, apiVersion), + tenantDomain); super.init(apiDefinition, basePathInSwagger, basePath); } diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/user/common/RESTAPIUserTestBase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/user/common/RESTAPIUserTestBase.java index 2d02df9308..35e98cd033 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/user/common/RESTAPIUserTestBase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/user/common/RESTAPIUserTestBase.java @@ -24,6 +24,7 @@ import org.wso2.carbon.identity.application.common.model.idp.xsd.IdentityProviderProperty; import org.wso2.carbon.integration.common.admin.client.AuthenticatorClient; import org.wso2.identity.integration.common.clients.Idp.IdentityProviderMgtServiceClient; +import org.wso2.identity.integration.common.utils.ISIntegrationTest; import org.wso2.identity.integration.test.rest.api.common.RESTTestBase; /** @@ -34,7 +35,6 @@ public class RESTAPIUserTestBase extends RESTTestBase { protected static final String API_USERS_BASE_PATH = "/api/users/%s"; protected static final String API_USERS_BASE_PATH_IN_SWAGGER = "/t/\\{tenant-domain\\}" + API_USERS_BASE_PATH; - protected static final String API_USERS_BASE_PATH_WITH_TENANT_CONTEXT = TENANT_CONTEXT_IN_URL + API_USERS_BASE_PATH; private static final String ADMIN = "admin"; private IdentityProviderMgtServiceClient superTenantIDPMgtClient; private IdentityProviderMgtServiceClient tenantIDPMgtClient; @@ -45,8 +45,8 @@ protected void testInit(String apiVersion, String apiDefinition, String tenantDo throws XPathExpressionException, RemoteException { String basePathInSwagger = String.format(API_USERS_BASE_PATH_IN_SWAGGER, apiVersion); - String basePath = String.format(API_USERS_BASE_PATH_WITH_TENANT_CONTEXT, - tenantDomain, apiVersion); + String basePath = ISIntegrationTest.getTenantedRelativePath(String.format(API_USERS_BASE_PATH, apiVersion), + tenantDomain); super.init(apiDefinition, basePathInSwagger, basePath); } @@ -64,8 +64,8 @@ protected void testInit(String apiVersion, String apiDefinition, String tenantDo throws XPathExpressionException, RemoteException { String basePathInSwagger = String.format(apiUserBasePathInSwagger, apiVersion); - String basePath = String.format(apiUserBasePathWithTenantContext, - tenantDomain, apiVersion); + String basePath = ISIntegrationTest.getTenantedRelativePath(String.format(apiUserBasePathWithTenantContext, + apiVersion), tenantDomain); super.init(apiDefinition, basePathInSwagger, basePath); } diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/user/liteUserRegister/LiteUserRegisterTestCase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/user/liteUserRegister/LiteUserRegisterTestCase.java index d61cc05a04..009b95aff8 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/user/liteUserRegister/LiteUserRegisterTestCase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/user/liteUserRegister/LiteUserRegisterTestCase.java @@ -39,15 +39,13 @@ public class LiteUserRegisterTestCase extends LiteUserRegisterTestBase { protected static final String API_LITE_USER_REGISTER_BASE_PATH = "/api/identity/user/%s"; protected static final String API_LITE_USER_REGISTER_BASE_PATH_IN_SWAGGER = "/t/\\{tenant-domain\\}" + API_LITE_USER_REGISTER_BASE_PATH; - protected static final String API_LITE_USER_REGISTER_BASE_PATH_WITH_TENANT_CONTEXT = - TENANT_CONTEXT_IN_URL + API_LITE_USER_REGISTER_BASE_PATH; protected static final String API_VERSION_LITE_USER = "v1.0"; @BeforeClass(alwaysRun = true) public void init() throws Exception { super.testInit(API_VERSION_LITE_USER, swaggerDefinitionLiteUserRegister, tenant, - API_LITE_USER_REGISTER_BASE_PATH_IN_SWAGGER, API_LITE_USER_REGISTER_BASE_PATH_WITH_TENANT_CONTEXT); + API_LITE_USER_REGISTER_BASE_PATH_IN_SWAGGER, API_LITE_USER_REGISTER_BASE_PATH); } @BeforeMethod(alwaysRun = true) diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/user/selfRegister/SelfRegisterTenantedTestCase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/user/selfRegister/SelfRegisterTenantedTestCase.java index 5e44b9cbf2..395a660cee 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/user/selfRegister/SelfRegisterTenantedTestCase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/user/selfRegister/SelfRegisterTenantedTestCase.java @@ -46,7 +46,7 @@ public void init() throws Exception { this.tenant = context.getContextTenant().getDomain(); super.testInit(API_VERSION_SELF_REGISTER, swaggerDefinitionSelfRegister, tenant, - API_SELF_REGISTER_BASE_PATH_IN_SWAGGER, API_SELF_REGISTER_BASE_PATH_WITH_TENANT_CONTEXT); + API_SELF_REGISTER_BASE_PATH_IN_SWAGGER, API_SELF_REGISTER_BASE_PATH); selfRegisterUserInfo = readResource("self-register-tenanted-user-request-body.json"); } diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/user/selfRegister/SelfRegisterTestBase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/user/selfRegister/SelfRegisterTestBase.java index 8492487e98..cbc8249e63 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/user/selfRegister/SelfRegisterTestBase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/user/selfRegister/SelfRegisterTestBase.java @@ -35,8 +35,6 @@ public class SelfRegisterTestBase extends RESTAPIUserTestBase { protected static final String API_SELF_REGISTER_BASE_PATH = "/api/identity/user/%s"; protected static final String API_SELF_REGISTER_BASE_PATH_IN_SWAGGER = "/t/\\{tenant-domain\\}" + API_SELF_REGISTER_BASE_PATH; - protected static final String API_SELF_REGISTER_BASE_PATH_WITH_TENANT_CONTEXT = - TENANT_CONTEXT_IN_URL + API_SELF_REGISTER_BASE_PATH; protected static final String API_VERSION_SELF_REGISTER = "v1.0"; static { diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/user/selfRegister/SelfRegisterTestCase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/user/selfRegister/SelfRegisterTestCase.java index 4fff4407ee..e876957a8a 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/user/selfRegister/SelfRegisterTestCase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/user/selfRegister/SelfRegisterTestCase.java @@ -46,7 +46,7 @@ public void init() throws Exception { this.tenant = context.getContextTenant().getDomain(); super.testInit(API_VERSION_SELF_REGISTER, swaggerDefinitionSelfRegister, tenant, - API_SELF_REGISTER_BASE_PATH_IN_SWAGGER, API_SELF_REGISTER_BASE_PATH_WITH_TENANT_CONTEXT); + API_SELF_REGISTER_BASE_PATH_IN_SWAGGER, API_SELF_REGISTER_BASE_PATH); selfRegisterUserInfo = readResource("self-register-request-body.json"); } diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/ChallengeQuestionsRestClient.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/ChallengeQuestionsRestClient.java index 5951942b61..eccfefb287 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/ChallengeQuestionsRestClient.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/ChallengeQuestionsRestClient.java @@ -25,6 +25,7 @@ import org.apache.http.message.BasicHeader; import org.testng.Assert; import org.wso2.carbon.automation.engine.context.beans.Tenant; +import org.wso2.identity.integration.common.utils.ISIntegrationTest; import org.wso2.identity.integration.test.rest.api.server.challenge.v1.model.UserChallengeAnswer; import org.wso2.identity.integration.test.utils.OAuth2Constant; @@ -57,8 +58,8 @@ public void setChallengeQuestionAnswer(String userId, String questionSetId, UserChallengeAnswer challengeAsnwerObj) throws Exception { String jsonRequest = toJSONString(challengeAsnwerObj); - String endPointUrl = serverUrl + TENANT_PATH + tenantDomain + PATH_SEPARATOR + - String.format(CHALLENGE_QUESTION_BASE_PATH, userId) + PATH_SEPARATOR + questionSetId; + String endPointUrl = serverUrl + ISIntegrationTest.getTenantedRelativePath(String.format( + CHALLENGE_QUESTION_BASE_PATH, userId) + PATH_SEPARATOR + questionSetId, tenantDomain); try (CloseableHttpResponse response = getResponseOfHttpPost(endPointUrl, jsonRequest, getHeaders())) { Assert.assertEquals(response.getStatusLine().getStatusCode(), HttpServletResponse.SC_CREATED, diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/ClaimManagementRestClient.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/ClaimManagementRestClient.java index 86ca925c4f..86886281df 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/ClaimManagementRestClient.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/ClaimManagementRestClient.java @@ -29,6 +29,7 @@ import org.json.simple.JSONObject; import org.testng.Assert; import org.wso2.carbon.automation.engine.context.beans.Tenant; +import org.wso2.identity.integration.common.utils.ISIntegrationTest; import org.wso2.identity.integration.test.rest.api.server.claim.management.v1.model.ExternalClaimReq; import javax.servlet.http.HttpServletResponse; @@ -36,7 +37,6 @@ public class ClaimManagementRestClient extends RestBaseClient { - private static final String TENANT_PATH = "t/%s"; private static final String API_SERVER_BASE_PATH = "/api/server/v1"; private static final String CLAIM_DIALECTS_ENDPOINT_URI = "/claim-dialects"; @@ -54,7 +54,7 @@ public ClaimManagementRestClient(String backendURL, Tenant tenantInfo) { String tenantDomain = tenantInfo.getContextUser().getUserDomain(); - serverBasePath = backendURL + String.format(TENANT_PATH, tenantDomain) + API_SERVER_BASE_PATH; + serverBasePath = backendURL + ISIntegrationTest.getTenantedRelativePath(API_SERVER_BASE_PATH, tenantDomain); } /** diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/EmailTemplatesRestClient.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/EmailTemplatesRestClient.java index 70da28736b..d6a0c1710d 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/EmailTemplatesRestClient.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/EmailTemplatesRestClient.java @@ -29,11 +29,12 @@ import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.wso2.carbon.automation.engine.context.beans.Tenant; +import org.wso2.identity.integration.common.utils.ISIntegrationTest; + import java.io.IOException; public class EmailTemplatesRestClient extends RestBaseClient { - private static final String TENANT_PATH = "t/%s"; private static final String API_SERVER_BASE_PATH = "/api/server/v1"; private static final String EMAIL_TEMPLATES_EMAIL_BASE_PATH = "/email"; private static final String EMAIL_TEMPLATE_TYPES_PATH = "/template-types"; @@ -51,8 +52,8 @@ public EmailTemplatesRestClient(String backendURL, Tenant tenantInfo) { String tenantDomain = tenantInfo.getContextUser().getUserDomain(); - emailTemplateApiBasePath = backendURL + String.format(TENANT_PATH, tenantDomain) + API_SERVER_BASE_PATH + - EMAIL_TEMPLATES_EMAIL_BASE_PATH + EMAIL_TEMPLATE_TYPES_PATH; + emailTemplateApiBasePath = backendURL + ISIntegrationTest.getTenantedRelativePath(API_SERVER_BASE_PATH + + EMAIL_TEMPLATES_EMAIL_BASE_PATH + EMAIL_TEMPLATE_TYPES_PATH, tenantDomain); } /** diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/IdentityGovernanceRestClient.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/IdentityGovernanceRestClient.java index 9035e91cf1..be1811b8a9 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/IdentityGovernanceRestClient.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/IdentityGovernanceRestClient.java @@ -30,6 +30,7 @@ import org.apache.http.message.BasicHeader; import org.testng.Assert; import org.wso2.carbon.automation.engine.context.beans.Tenant; +import org.wso2.identity.integration.common.utils.ISIntegrationTest; import org.wso2.identity.integration.test.rest.api.server.identity.governance.v1.dto.ConnectorsPatchReq; import javax.servlet.http.HttpServletResponse; @@ -37,7 +38,6 @@ public class IdentityGovernanceRestClient extends RestBaseClient { - private static final String TENANT_PATH = "t/%s"; private static final String API_SERVER_BASE_PATH = "/api/server/v1"; private static final String IDENTITY_GOVERNANCE_BASE_PATH = "/identity-governance"; private static final String CONNECTORS_BASE_PATH = "/connectors"; @@ -54,8 +54,8 @@ public IdentityGovernanceRestClient(String backendURL, Tenant tenantInfo) { String tenantDomain = tenantInfo.getContextUser().getUserDomain(); - identityGovernanceApiBasePath = backendURL + String.format(TENANT_PATH, tenantDomain) + API_SERVER_BASE_PATH + - IDENTITY_GOVERNANCE_BASE_PATH; + identityGovernanceApiBasePath = backendURL + ISIntegrationTest.getTenantedRelativePath( + API_SERVER_BASE_PATH + IDENTITY_GOVERNANCE_BASE_PATH, tenantDomain); } /** diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/UserStoreMgtRestClient.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/UserStoreMgtRestClient.java index 8769123f1f..16a2d64323 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/UserStoreMgtRestClient.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/restclients/UserStoreMgtRestClient.java @@ -32,13 +32,13 @@ import org.testng.Assert; import org.wso2.carbon.automation.engine.context.beans.Tenant; import org.wso2.carbon.identity.user.store.configuration.stub.dto.UserStoreDTO; +import org.wso2.identity.integration.common.utils.ISIntegrationTest; import org.wso2.identity.integration.test.rest.api.server.user.store.v1.model.UserStoreReq; import javax.servlet.http.HttpServletResponse; import java.io.IOException; public class UserStoreMgtRestClient extends RestBaseClient { - private static final String TENANT_PATH = "t/%s"; private static final String API_SERVER_BASE_PATH = "/api/server/v1"; public static final String USER_STORES_ENDPOINT_URI = "/userstores"; private final CloseableHttpClient client; @@ -53,8 +53,8 @@ public UserStoreMgtRestClient(String backendURL, Tenant tenantInfo) { this.password = tenantInfo.getContextUser().getPassword(); String tenantDomain = tenantInfo.getContextUser().getUserDomain(); - userStoreBasePath = backendURL + String.format(TENANT_PATH, tenantDomain) + API_SERVER_BASE_PATH + - USER_STORES_ENDPOINT_URI; + userStoreBasePath = backendURL + ISIntegrationTest.getTenantedRelativePath(API_SERVER_BASE_PATH + + USER_STORES_ENDPOINT_URI, tenantDomain); } /** diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/scim2/rest/api/SCIM2BaseTest.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/scim2/rest/api/SCIM2BaseTest.java index ae3e8d50de..8800392aa5 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/scim2/rest/api/SCIM2BaseTest.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/scim2/rest/api/SCIM2BaseTest.java @@ -23,6 +23,7 @@ import org.testng.annotations.AfterClass; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; +import org.wso2.identity.integration.common.utils.ISIntegrationTest; import org.wso2.identity.integration.test.rest.api.common.RESTTestBase; import java.io.File; @@ -38,7 +39,6 @@ public class SCIM2BaseTest extends RESTTestBase { protected static String swaggerDefinition; protected static final String SCIM_CONTENT_TYPE = "application/scim+json"; protected static final String SCIM2_BASE_PATH_IN_SWAGGER = "/t/\\{tenant-domain\\}" + SCIM2_ENDPOINT; - protected static final String SCIM2_BASE_PATH_WITH_TENANT_CONTEXT = TENANT_CONTEXT_IN_URL + SCIM2_ENDPOINT; public static final String FILE_BASE_PATH = (System.getProperty("basedir", ".")) + File.separator + "src" + File.separator + "test" + File.separator + "resources" + File.separator; @@ -59,8 +59,7 @@ public void testInit(String apiDefinition, String tenantDomain) if ("carbon.super".equals(tenantDomain)) { basePath = String.format(SCIM2_ENDPOINT); } else { - basePath = String.format(SCIM2_BASE_PATH_WITH_TENANT_CONTEXT, - tenantDomain); + basePath = ISIntegrationTest.getTenantedRelativePath(SCIM2_ENDPOINT, tenantDomain); } super.init(apiDefinition, SCIM2_BASE_PATH_IN_SWAGGER, basePath); } diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/scim2/rest/api/SCIM2SchemasTest.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/scim2/rest/api/SCIM2SchemasTest.java index 2b65afb9a3..753dc85dc8 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/scim2/rest/api/SCIM2SchemasTest.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/scim2/rest/api/SCIM2SchemasTest.java @@ -30,6 +30,7 @@ import org.testng.annotations.Factory; import org.testng.annotations.Test; import org.wso2.carbon.automation.engine.context.TestUserMode; +import org.wso2.identity.integration.common.utils.ISIntegrationTest; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -194,7 +195,7 @@ private String getContext() { if (CARBON_SUPER.equals(tenant)) { return API_SERVER_BASE_CONTEXT; } else { - return String.format(TENANT_CONTEXT_IN_URL, tenant) + API_SERVER_BASE_CONTEXT; + return ISIntegrationTest.getTenantedRelativePath(API_SERVER_BASE_CONTEXT, tenant); } } }