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

Fix for TA-974 #224

Merged
merged 8 commits into from
Apr 25, 2016
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
"<am:code>700700</am:code><am:message>API blocked</am:message>";
protected static final String UNCLASSIFIED_AUTHENTICATION_FAILURE =
"<ams:message>Unclassified Authentication Failure</ams:message>";
protected static final String HTTP_RESPONSE_DATA_NOT_FOUND =
"<am:code>404</am:code><am:type>Status report</am:type><am:message>Not Found</am:message>";
protected static final String HTTP_RESPONSE_DATA_API_FORBIDDEN =
"<ams:code>900908</ams:code><ams:message>Resource forbidden </ams:message>";
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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
<class name="org.wso2.am.integration.tests.api.lifecycle.AccessibilityOfDeprecatedOldAPIAndPublishedCopyAPITestCase"/>
<class name="org.wso2.am.integration.tests.api.lifecycle.AccessibilityOfOldAPIAndCopyAPIWithOutReSubscriptionTestCase"/>
<!--&lt;!&ndash;Disable the test case because of APIMANAGER-3374&ndash;&gt;-->
<!--commented out due to this https://wso2.org/jira/browse/TA-974-->
<!--<class name="org.wso2.am.integration.tests.api.lifecycle.AccessibilityOfOldAPIAndCopyAPIWithReSubscriptionTestCase"/>-->
<class name="org.wso2.am.integration.tests.api.lifecycle.AccessibilityOfOldAPIAndCopyAPIWithReSubscriptionTestCase"/>
<class name="org.wso2.am.integration.tests.api.lifecycle.AccessibilityOfRetireAPITestCase"/>
<class name="org.wso2.am.integration.tests.api.lifecycle.AddEditRemoveRESTResourceTestCase"/>
<!--&lt;!&ndash;https://wso2.org/jira/browse/TA-970&ndash;&gt;-->
Expand Down