From 388dcac1d1ea0bf80ef304dbdaea61ab6007752d Mon Sep 17 00:00:00 2001 From: Ashan Thamara Palihakkara <75057725+ashanthamara@users.noreply.github.com> Date: Thu, 28 Nov 2024 15:38:35 +0530 Subject: [PATCH] Remove Update action authentication rest api related tests --- .../management/v1/ActionsFailureTest.java | 37 ------------------ .../management/v1/ActionsSuccessTest.java | 39 ------------------- 2 files changed, 76 deletions(-) diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/action/management/v1/ActionsFailureTest.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/action/management/v1/ActionsFailureTest.java index bb705ee0fd..6a0d729eae 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/action/management/v1/ActionsFailureTest.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/action/management/v1/ActionsFailureTest.java @@ -204,43 +204,6 @@ public void testUpdateActionWithInvalidID() { } @Test(dependsOnMethods = {"testUpdateActionWithInvalidID"}) - public void testUpdateActionWithInvalidEndpointAuthProperties() { - - AuthenticationTypeProperties authenticationType = new AuthenticationTypeProperties() - .properties(new HashMap() {{ - put(TEST_USERNAME_INVALID_AUTH_PROPERTY, TEST_USERNAME_AUTH_PROPERTY_VALUE); - put(TEST_PASSWORD_AUTH_PROPERTY, TEST_PASSWORD_AUTH_PROPERTY_VALUE); - }}); - - String body = toJSONString(authenticationType); - Response responseOfPut = getResponseOfPut(ACTION_MANAGEMENT_API_BASE_PATH + - PRE_ISSUE_ACCESS_TOKEN_PATH + "/" + testActionId2 + ACTION_BASIC_AUTH_PATH, body); - responseOfPut.then() - .log().ifValidationFails() - .assertThat().statusCode(HttpStatus.SC_BAD_REQUEST) - .body("description", equalTo("Required authentication properties are not " + - "provided or invalid.")); - } - - @Test(dependsOnMethods = {"testUpdateActionWithInvalidEndpointAuthProperties"}) - public void testUpdateActionWithEmptyEndpointAuthPropertyValues() { - - AuthenticationTypeProperties authenticationType = new AuthenticationTypeProperties() - .properties(new HashMap() {{ - put(TEST_USERNAME_AUTH_PROPERTY, ""); - put(TEST_PASSWORD_AUTH_PROPERTY, TEST_PASSWORD_AUTH_PROPERTY_VALUE); - }}); - - String body = toJSONString(authenticationType); - Response responseOfPut = getResponseOfPut(ACTION_MANAGEMENT_API_BASE_PATH + - PRE_ISSUE_ACCESS_TOKEN_PATH + "/" + testActionId2 + ACTION_BASIC_AUTH_PATH, body); - responseOfPut.then() - .log().ifValidationFails() - .assertThat().statusCode(HttpStatus.SC_BAD_REQUEST) - .body("description", equalTo("Authentication property values cannot be empty.")); - } - - @Test(dependsOnMethods = {"testUpdateActionWithEmptyEndpointAuthPropertyValues"}) public void testActivateActionWithInvalidID() { getResponseOfPost(ACTION_MANAGEMENT_API_BASE_PATH + PRE_ISSUE_ACCESS_TOKEN_PATH + diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/action/management/v1/ActionsSuccessTest.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/action/management/v1/ActionsSuccessTest.java index 7e7494bb72..e2a6573ba9 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/action/management/v1/ActionsSuccessTest.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/action/management/v1/ActionsSuccessTest.java @@ -324,45 +324,6 @@ public void testUpdateAction() { } @Test(dependsOnMethods = {"testUpdateAction"}) - public void testUpdateEndpointAuthentication() { - - AuthenticationTypeProperties newAuthProperties = new AuthenticationTypeProperties() - .properties(new HashMap() {{ - put(TEST_ACCESS_TOKEN_AUTH_PROPERTY, TEST_ACCESS_TOKEN_AUTH_PROPERTY_VALUE); - }}); - - String body = toJSONString(newAuthProperties); - Response responseOfPut = getResponseOfPut(ACTION_MANAGEMENT_API_BASE_PATH + - PRE_ISSUE_ACCESS_TOKEN_PATH + "/" + testActionId + ACTION_BEARER_AUTH_PATH, body); - - responseOfPut.then() - .log().ifValidationFails() - .assertThat() - .statusCode(HttpStatus.SC_OK) - .body("endpoint.uri", equalTo(TEST_ENDPOINT_URI)) - .body("endpoint.authentication.type", equalTo(AuthenticationType.TypeEnum.BEARER.toString())); - } - - @Test(dependsOnMethods = {"testUpdateEndpointAuthentication"}) - public void testUpdateEndpointAuthProperties() { - - AuthenticationTypeProperties newAuthProperties = new AuthenticationTypeProperties() - .properties(new HashMap() {{ - put(TEST_ACCESS_TOKEN_AUTH_PROPERTY, TEST_UPDATED_ACCESS_TOKEN_AUTH_PROPERTY_VALUE); - }}); - - String body = toJSONString(newAuthProperties); - Response responseOfPut = getResponseOfPut(ACTION_MANAGEMENT_API_BASE_PATH + - PRE_ISSUE_ACCESS_TOKEN_PATH + "/" + testActionId + ACTION_BEARER_AUTH_PATH, body); - - responseOfPut.then() - .log().ifValidationFails() - .assertThat() - .statusCode(HttpStatus.SC_OK) - .body("endpoint.authentication.type", equalTo(AuthenticationType.TypeEnum.BEARER.toString())); - } - - @Test(dependsOnMethods = {"testUpdateEndpointAuthProperties"}) public void testDeactivateAction() { getResponseOfPost(ACTION_MANAGEMENT_API_BASE_PATH + PRE_ISSUE_ACCESS_TOKEN_PATH +