From 7a2ce080be3873354ba28ed72b7b70ed592b6a79 Mon Sep 17 00:00:00 2001 From: sanethd Date: Thu, 11 Jun 2015 13:47:12 +0530 Subject: [PATCH] fix for TA-974 --- .../tests/api/lifecycle/APIManagerLifecycleBaseTest.java | 4 ++-- ...ssibilityOfOldAPIAndCopyAPIWithReSubscriptionTestCase.java | 4 ++-- .../tests-backend/src/test/resources/testng.xml | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/APIManagerLifecycleBaseTest.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/APIManagerLifecycleBaseTest.java index 3a898ff95c..a18a4fc3b2 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/APIManagerLifecycleBaseTest.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/APIManagerLifecycleBaseTest.java @@ -54,10 +54,10 @@ public class APIManagerLifecycleBaseTest extends APIMIntegrationBaseTest { protected static final int HTTP_RESPONSE_CODE_FORBIDDEN = Response.Status.FORBIDDEN.getStatusCode(); protected static final String HTTP_RESPONSE_DATA_API_BLOCK = "700700API blocked"; - protected static final String UNCLASSIFIED_AUTHENTICATION_FAILURE = - "Unclassified Authentication Failure"; protected static final String HTTP_RESPONSE_DATA_NOT_FOUND = "404Status reportNot Found"; + protected static final String HTTP_RESPONSE_DATA_API_FORBIDDEN = + "900908Resource forbidden "; protected static final int GOLD_INVOCATION_LIMIT_PER_MIN = 20; protected static final int SILVER_INVOCATION_LIMIT_PER_MIN = 5; protected static final String TIER_UNLIMITED = "Unlimited"; diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/AccessibilityOfOldAPIAndCopyAPIWithReSubscriptionTestCase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/AccessibilityOfOldAPIAndCopyAPIWithReSubscriptionTestCase.java index 23b976b389..59e49c4cd4 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/AccessibilityOfOldAPIAndCopyAPIWithReSubscriptionTestCase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/AccessibilityOfOldAPIAndCopyAPIWithReSubscriptionTestCase.java @@ -158,9 +158,9 @@ public void testInvokeNewAPIBeforeSubscribeTheNewVersion() throws APIManagerInte HttpResponse oldVersionInvokeResponse = HttpRequestUtil.doGet(gatewayWebAppUrl + API_CONTEXT + "/" + API_VERSION_2_0_0 + API_END_POINT_METHOD, requestHeaders); - assertEquals(oldVersionInvokeResponse.getResponseCode(), HTTP_RESPONSE_CODE_UNAUTHORIZED, + assertEquals(oldVersionInvokeResponse.getResponseCode(), HTTP_RESPONSE_CODE_FORBIDDEN, "Response code mismatched when invoke new api before subscribe the new version"); - assertTrue(oldVersionInvokeResponse.getData().contains(UNCLASSIFIED_AUTHENTICATION_FAILURE), + assertTrue(oldVersionInvokeResponse.getData().contains(HTTP_RESPONSE_DATA_API_FORBIDDEN), "Response data mismatched when invoke new API version before subscribe the new version." + " Response Data:" + oldVersionInvokeResponse.getData()); } diff --git a/modules/integration/tests-integration/tests-backend/src/test/resources/testng.xml b/modules/integration/tests-integration/tests-backend/src/test/resources/testng.xml index 1204f05092..95ee4e3a6d 100755 --- a/modules/integration/tests-integration/tests-backend/src/test/resources/testng.xml +++ b/modules/integration/tests-integration/tests-backend/src/test/resources/testng.xml @@ -31,8 +31,7 @@ - - +