diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/organization/management/v1/OrganizationManagementFailureTest.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/organization/management/v1/OrganizationManagementFailureTest.java index b20b4494dc3..ed130425371 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/organization/management/v1/OrganizationManagementFailureTest.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/rest/api/server/organization/management/v1/OrganizationManagementFailureTest.java @@ -135,7 +135,7 @@ public void testGetOrganizationsWithInvalidOperator() { String filterQuery = "?filter=name ca G&limit=10&recursive=false"; String endpointURL = ORGANIZATION_MANAGEMENT_API_BASE_PATH + filterQuery; Response response = getResponseOfGetWithOAuth2(endpointURL, m2mToken); - validateErrorResponseWithoutTraceId(response, HttpStatus.SC_BAD_REQUEST, "ORG-60059"); + validateErrorResponse(response, HttpStatus.SC_BAD_REQUEST, "ORG-60059"); } @Test(dependsOnMethods = "testGetOrganizationsWithInvalidOperator") @@ -144,7 +144,7 @@ public void testGetOrganizationsWithUnsupportedAttribute() { String filterQuery = "?filter=attribute.Country co S&limit=10&recursive=false"; String endpointURL = ORGANIZATION_MANAGEMENT_API_BASE_PATH + filterQuery; Response response = getResponseOfGetWithOAuth2(endpointURL, m2mToken); - validateErrorResponseWithoutTraceId(response, HttpStatus.SC_BAD_REQUEST, "ORG-60023"); + validateErrorResponse(response, HttpStatus.SC_BAD_REQUEST, "ORG-60023"); } @Test(dependsOnMethods = "testGetOrganizationsWithUnsupportedAttribute") @@ -153,7 +153,7 @@ public void testGetOrganizationsMetaAttributesWithInvalidOperator() { String filterQuery = "?filter=attributes ca C&limit=10&recursive=false"; String endpointURL = ORGANIZATION_MANAGEMENT_API_BASE_PATH + "/meta-attributes" + filterQuery; Response response = getResponseOfGetWithOAuth2(endpointURL, m2mToken); - validateErrorResponseWithoutTraceId(response, HttpStatus.SC_BAD_REQUEST, "ORG-60059"); + validateErrorResponse(response, HttpStatus.SC_BAD_REQUEST, "ORG-60059"); } @Test(dependsOnMethods = "testGetOrganizationsMetaAttributesWithInvalidOperator") @@ -162,7 +162,7 @@ public void testGetOrganizationsMetaAttributesWithUnsupportedAttribute() { String filterQuery = "?filter=attribute co S&limit=10&recursive=false"; String endpointURL = ORGANIZATION_MANAGEMENT_API_BASE_PATH + "/meta-attributes" + filterQuery; Response response = getResponseOfGetWithOAuth2(endpointURL, m2mToken); - validateErrorResponseWithoutTraceId(response, HttpStatus.SC_BAD_REQUEST, "ORG-60023"); + validateErrorResponse(response, HttpStatus.SC_BAD_REQUEST, "ORG-60023"); } @Test(dependsOnMethods = "testGetOrganizationsMetaAttributesWithUnsupportedAttribute") @@ -180,7 +180,7 @@ public void testAddDiscoveryAttributesWithoutAddingConfig() throws IOException { String requestBody = readResource("add-discovery-attributes-request-body.json"); requestBody = requestBody.replace("${organizationID}", organizationIDs.get(0)); Response response = getResponseOfPostWithOAuth2(endpointURL, requestBody, m2mToken); - validateErrorResponseWithoutTraceId(response, HttpStatus.SC_BAD_REQUEST, "ORG-60080"); + validateErrorResponse(response, HttpStatus.SC_BAD_REQUEST, "ORG-60080"); } @Test(dependsOnMethods = "testAddDiscoveryAttributesWithoutAddingConfig") @@ -237,7 +237,7 @@ public void testAddDiscoveryAttributesToNonExistingOrganization() throws IOExcep String requestBody = readResource("add-discovery-attributes-request-body.json"); requestBody = requestBody.replace("${organizationID}", invalidOrganizationID); Response response = getResponseOfPostWithOAuth2(endpointURL, requestBody, m2mToken); - validateErrorResponseWithoutTraceId(response, HttpStatus.SC_NOT_FOUND, "ORG-60015", + validateErrorResponse(response, HttpStatus.SC_NOT_FOUND, "ORG-60015", invalidOrganizationID); } @@ -260,7 +260,7 @@ public void testAddDiscoveryAttributesWhenAlreadyAdded() throws IOException { Response firstResponse = getResponseOfPostWithOAuth2(endpointURL, requestBody, m2mToken); validateHttpStatusCode(firstResponse, HttpStatus.SC_CREATED); Response secondResponse = getResponseOfPostWithOAuth2(endpointURL, requestBody, m2mToken); - validateErrorResponseWithoutTraceId(secondResponse, HttpStatus.SC_BAD_REQUEST, "ORG-60085", + validateErrorResponse(secondResponse, HttpStatus.SC_BAD_REQUEST, "ORG-60085", organizationIDs.get(0)); } @@ -278,7 +278,7 @@ public void testGetDiscoveryAttributesOfNonExistingOrganization() { String endpointURL = ORGANIZATION_MANAGEMENT_API_BASE_PATH + PATH_SEPARATOR + invalidOrganizationID + ORGANIZATION_DISCOVERY_API_PATH; Response response = getResponseOfGetWithOAuth2(endpointURL, m2mToken); - validateErrorResponseWithoutTraceId(response, HttpStatus.SC_NOT_FOUND, "ORG-60015", + validateErrorResponse(response, HttpStatus.SC_NOT_FOUND, "ORG-60015", invalidOrganizationID); } @@ -297,7 +297,7 @@ public void testDeleteDiscoveryAttributesOfNonExistingOrganization() { String endpointURL = ORGANIZATION_MANAGEMENT_API_BASE_PATH + PATH_SEPARATOR + invalidOrganizationID + ORGANIZATION_DISCOVERY_API_PATH; Response response = getResponseOfDeleteWithOAuth2(endpointURL, m2mToken); - validateErrorResponseWithoutTraceId(response, HttpStatus.SC_NOT_FOUND, "ORG-60015", + validateErrorResponse(response, HttpStatus.SC_NOT_FOUND, "ORG-60015", invalidOrganizationID); } @@ -321,7 +321,7 @@ public void testUpdateWithUnavailableDiscoveryAttributes() throws IOException { Response firstResponse = getResponseOfPutWithOAuth2(firstEndpointURL, requestBody, m2mToken); validateHttpStatusCode(firstResponse, HttpStatus.SC_OK); Response secondResponse = getResponseOfPutWithOAuth2(secondEndpointURL, requestBody, m2mToken); - validateErrorResponseWithoutTraceId(secondResponse, HttpStatus.SC_BAD_REQUEST, "ORG-60083"); + validateErrorResponse(secondResponse, HttpStatus.SC_BAD_REQUEST, "ORG-60083"); } @Test(dependsOnMethods = "testUpdateWithUnavailableDiscoveryAttributes") @@ -331,7 +331,7 @@ public void testUpdateDiscoveryAttributesOfNonExistingOrganization() throws IOEx + ORGANIZATION_DISCOVERY_API_PATH; String requestBody = readResource("update-discovery-attributes-request-body.json"); Response response = getResponseOfPutWithOAuth2(endpointURL, requestBody, m2mToken); - validateErrorResponseWithoutTraceId(response, HttpStatus.SC_NOT_FOUND, "ORG-60015", + validateErrorResponse(response, HttpStatus.SC_NOT_FOUND, "ORG-60015", invalidOrganizationID); }