Skip to content

Commit

Permalink
Update mock server instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
Shenali-SJ committed Sep 16, 2024
1 parent 8f600c9 commit 0bc3ce5
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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();
}

Expand All @@ -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();
Expand Down

0 comments on commit 0bc3ce5

Please sign in to comment.