-
Notifications
You must be signed in to change notification settings - Fork 785
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
Added test case to validate both basic auth and auth2 enable api through basic auth. #13179
base: master
Are you sure you want to change the base?
Conversation
...s-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/APISecurityTestCase.java
Outdated
Show resolved
Hide resolved
private final String basicAuthSecuredAPIContext = "BasicAuthSecuredAPI"; | ||
private final String basicAuthSecuredAPIContext = "BasicAuthAndOauth2SecuredAPI"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate variables
@@ -1199,6 +1229,16 @@ public void testInvocationWithApiKeysWithoutSubscription() throws Exception { | |||
", but got " + invocationResponseAfterSubscriptionRemoved.getResponseCode()); | |||
} | |||
|
|||
@Test(description = "Testing the invocation with Basic Auth for APIKey Only API", dependsOnMethods = { | |||
"testInvokeBasicAuthAfterCredentialsInvalid"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the test description
@@ -1199,6 +1229,16 @@ public void testInvocationWithApiKeysWithoutSubscription() throws Exception { | |||
", but got " + invocationResponseAfterSubscriptionRemoved.getResponseCode()); | |||
} | |||
|
|||
@Test(description = "Testing the invocation with Basic Auth for APIKey Only API", dependsOnMethods = { | |||
"testInvokeBasicAuthAfterCredentialsInvalid"}) | |||
public void testInvocationWithBasicAuthandOauth2ForAPIKey() throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test method name not conveying what is tested
public void testInvocationWithBasicAuthandOauth2ForAPIKey() throws Exception { | ||
Map<String, String> requestHeaders = new HashMap<>(); | ||
requestHeaders.put("accept", "text/xml"); | ||
requestHeaders.put("Authorization", "Basic abcce"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Header value should be set correctly
No description provided.