Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify deleteAction rest api tests #22023

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
*/
public class ActionsFailureTest extends ActionsTestBase {

private static final String TEST_USERNAME_INVALID_AUTH_PROPERTY = "invalidUsername";
private static final String TEST_ACTION_INVALID_ID = "invalid_id";
private static ActionModel action1;
private static ActionModel action2;
private static String testActionId2;
Expand Down Expand Up @@ -222,18 +220,6 @@ public void testDeactivateActionWithInvalidID() {
.assertThat()
.statusCode(HttpStatus.SC_NOT_FOUND)
.body("description", equalTo("No Action is configured on the given Action Type and Id."));
}

@Test(dependsOnMethods = {"testDeactivateActionWithInvalidID"})
public void testDeleteActionWithInvalidID() {

getResponseOfDelete(ACTION_MANAGEMENT_API_BASE_PATH + PRE_ISSUE_ACCESS_TOKEN_PATH +
"/" + TEST_ACTION_INVALID_ID)
.then()
.log().ifValidationFails()
.assertThat()
.statusCode(HttpStatus.SC_NOT_FOUND)
.body("description", equalTo("No Action is configured on the given Action Type and Id."));

// Delete, created action.
deleteAction(PRE_ISSUE_ACCESS_TOKEN_PATH , testActionId2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,17 @@ public void testDeleteAction() {
}

@Test(dependsOnMethods = {"testDeleteAction"})
public void testDeleteNonExistingAction() {

getResponseOfDelete(ACTION_MANAGEMENT_API_BASE_PATH + PRE_ISSUE_ACCESS_TOKEN_PATH +
"/" + TEST_ACTION_INVALID_ID)
.then()
.log().ifValidationFails()
.assertThat()
.statusCode(HttpStatus.SC_NO_CONTENT);
}

@Test(dependsOnMethods = {"testDeleteNonExistingAction"})
public void testCreateActionWithExtraEndpointAuthProperties() {

action = new ActionModel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ public class ActionsTestBase extends RESTAPIServerTestBase {
protected static final String TEST_APIKEY_HEADER_AUTH_PROPERTY_VALUE = "key";
protected static final String TEST_APIKEY_VALUE_AUTH_PROPERTY = "value";
protected static final String TEST_APIKEY_VALUE_AUTH_PROPERTY_VALUE = "secret";
protected static final String TEST_USERNAME_INVALID_AUTH_PROPERTY = "invalidUsername";
protected static final String TEST_ACTION_INVALID_ID = "invalid_id";

protected static final Set<String> NOT_IMPLEMENTED_ACTION_TYPE_PATHS = new HashSet<>();

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2356,7 +2356,7 @@
<properties>

<!--Carbon Identity Framework Version-->
<carbon.identity.framework.version>7.7.30</carbon.identity.framework.version>
<carbon.identity.framework.version>7.7.33</carbon.identity.framework.version>
<carbon.identity.framework.version.range>[5.14.67, 8.0.0)</carbon.identity.framework.version.range>

<!--SAML Common Utils Version-->
Expand Down