From 0bc3ce5bde17b7705a04d8d1b8736d742c76b195 Mon Sep 17 00:00:00 2001 From: Shenali Date: Mon, 16 Sep 2024 22:49:36 +0530 Subject: [PATCH] Update mock server instantiation --- .../actions/PreIssueAccessTokenCodeGrantTestCase.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/actions/PreIssueAccessTokenCodeGrantTestCase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/actions/PreIssueAccessTokenCodeGrantTestCase.java index 2b17e62d86..3e72aca526 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/actions/PreIssueAccessTokenCodeGrantTestCase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/actions/PreIssueAccessTokenCodeGrantTestCase.java @@ -44,7 +44,7 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import org.wso2.carbon.automation.engine.context.TestUserMode; -import org.wso2.identity.integration.test.mocks.MockServer; +import org.wso2.identity.integration.test.actions.mockserver.ActionsMockServer; import org.wso2.identity.integration.test.oauth2.dataprovider.model.ApplicationConfig; import org.wso2.identity.integration.test.oauth2.dataprovider.model.TokenScopes; import org.wso2.identity.integration.test.oauth2.dataprovider.model.UserClaimConfig; @@ -141,6 +141,7 @@ public class PreIssueAccessTokenCodeGrantTestCase extends ActionsBaseTestCase { private String userId; private String roleId; private JWTClaimsSet jwtClaims; + private ActionsMockServer actionsMockServer; /** * Initializes Test environment and sets up necessary configurations. @@ -184,7 +185,10 @@ protected boolean isRedirectable(String method) { addUserWithRole(applicationId, customScopes); - MockServer.createMockServer(MOCK_SERVER_ENDPOINT); + actionsMockServer = new ActionsMockServer(); + + actionsMockServer.createMockServer(MOCK_SERVER_ENDPOINT); + actionId = createPreIssueAccessTokenAction(); } @@ -196,7 +200,7 @@ public void atEnd() throws Exception { deleteApp(applicationId); deleteDomainAPI(domainAPIId); scim2RestClient.deleteUser(userId); - MockServer.shutDownMockServer(); + actionsMockServer.shutDownMockServer(); restClient.closeHttpClient(); scim2RestClient.closeHttpClient(); actionsRestClient.closeHttpClient();