-
Notifications
You must be signed in to change notification settings - Fork 727
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
[integration tests] Pre issues access token action with password grant type #20903
Conversation
...nd/src/test/java/org/wso2/identity/integration/test/actions/PreIssueAccessTokenTestCase.java
Outdated
Show resolved
Hide resolved
...nd/src/test/java/org/wso2/identity/integration/test/actions/PreIssueAccessTokenTestCase.java
Outdated
Show resolved
Hide resolved
...nd/src/test/java/org/wso2/identity/integration/test/actions/PreIssueAccessTokenTestCase.java
Outdated
Show resolved
Hide resolved
...nd/src/test/java/org/wso2/identity/integration/test/actions/PreIssueAccessTokenTestCase.java
Outdated
Show resolved
Hide resolved
...nd/src/test/java/org/wso2/identity/integration/test/actions/PreIssueAccessTokenTestCase.java
Outdated
Show resolved
Hide resolved
...nd/src/test/java/org/wso2/identity/integration/test/actions/PreIssueAccessTokenTestCase.java
Outdated
Show resolved
Hide resolved
...nd/src/test/java/org/wso2/identity/integration/test/actions/PreIssueAccessTokenTestCase.java
Outdated
Show resolved
Hide resolved
...nd/src/test/java/org/wso2/identity/integration/test/actions/PreIssueAccessTokenTestCase.java
Outdated
Show resolved
Hide resolved
...nd/src/test/java/org/wso2/identity/integration/test/actions/PreIssueAccessTokenTestCase.java
Outdated
Show resolved
Hide resolved
...nd/src/test/java/org/wso2/identity/integration/test/actions/PreIssueAccessTokenTestCase.java
Outdated
Show resolved
Hide resolved
...ts-backend/src/test/java/org/wso2/identity/integration/test/actions/ActionsBaseTestCase.java
Outdated
Show resolved
Hide resolved
...nd/src/test/java/org/wso2/identity/integration/test/actions/PreIssueAccessTokenTestCase.java
Outdated
Show resolved
Hide resolved
...ts-backend/src/test/java/org/wso2/identity/integration/test/actions/ActionsBaseTestCase.java
Outdated
Show resolved
Hide resolved
...ts-backend/src/test/java/org/wso2/identity/integration/test/actions/ActionsBaseTestCase.java
Outdated
Show resolved
Hide resolved
...est/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAbstractIntegrationTest.java
Outdated
Show resolved
Hide resolved
...est/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAbstractIntegrationTest.java
Outdated
Show resolved
Hide resolved
...est/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAbstractIntegrationTest.java
Outdated
Show resolved
Hide resolved
...est/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAbstractIntegrationTest.java
Show resolved
Hide resolved
...tion/test/rest/api/server/application/management/v1/model/AuthorizedBusinessAPIResponse.java
Outdated
Show resolved
Hide resolved
...s-backend/src/test/java/org/wso2/identity/integration/test/restclients/OAuth2RestClient.java
Outdated
Show resolved
Hide resolved
...tion/test/rest/api/server/application/management/v1/model/AuthorizedBusinessAPIResponse.java
Outdated
Show resolved
Hide resolved
...tion/test/rest/api/server/application/management/v1/model/AuthorizedBusinessAPIResponse.java
Outdated
Show resolved
Hide resolved
...tegration/test/rest/api/server/application/management/v1/model/BusinessAPICreationModel.java
Outdated
Show resolved
Hide resolved
...-backend/src/test/java/org/wso2/identity/integration/test/restclients/ActionsRestClient.java
Outdated
Show resolved
Hide resolved
346ccbe
to
874cc0d
Compare
...-backend/src/test/java/org/wso2/identity/integration/test/restclients/ActionsRestClient.java
Outdated
Show resolved
Hide resolved
...s-backend/src/test/java/org/wso2/identity/integration/test/restclients/OAuth2RestClient.java
Outdated
Show resolved
Hide resolved
...integration/test/rest/api/server/application/management/v1/model/DomainAPICreationModel.java
Outdated
Show resolved
Hide resolved
...integration/test/rest/api/server/application/management/v1/model/DomainAPICreationModel.java
Outdated
Show resolved
Hide resolved
...integration/test/rest/api/server/application/management/v1/model/DomainAPICreationModel.java
Outdated
Show resolved
Hide resolved
...nd/src/test/java/org/wso2/identity/integration/test/actions/PreIssueAccessTokenTestCase.java
Outdated
Show resolved
Hide resolved
...nd/src/test/java/org/wso2/identity/integration/test/actions/PreIssueAccessTokenTestCase.java
Outdated
Show resolved
Hide resolved
...nd/src/test/java/org/wso2/identity/integration/test/actions/PreIssueAccessTokenTestCase.java
Outdated
Show resolved
Hide resolved
...nd/src/test/java/org/wso2/identity/integration/test/actions/PreIssueAccessTokenTestCase.java
Outdated
Show resolved
Hide resolved
...nd/src/test/java/org/wso2/identity/integration/test/actions/PreIssueAccessTokenTestCase.java
Outdated
Show resolved
Hide resolved
MockServer.createMockServer(MOCK_SERVER_ENDPOINT); | ||
createPreIssueAccessTokenAction(); | ||
|
||
accessToken = retrieveAccessToken(application.getId(), customScopes); |
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.
Retrieving access token should be a test case. We should assert for the request that goes to the mock server.
We can do this as an improvement to the test case
...ava/org/wso2/identity/integration/test/actions/PreIssueAccessTokenPasswordGrantTestCase.java
Outdated
Show resolved
Hide resolved
...ava/org/wso2/identity/integration/test/actions/PreIssueAccessTokenPasswordGrantTestCase.java
Outdated
Show resolved
Hide resolved
@Test(groups = "wso2.is", description = "Verify the presence of the specified custom boolean claim in the access " + | ||
"token", dataProvider = "getBooleanClaim") | ||
public void testTokenBooleanClaimAddOperation(String claim, Boolean newClaimValue, int index) throws Exception { | ||
|
||
Boolean claimValue = jwtClaims.getBooleanClaim(claim); | ||
if (index == 0) { | ||
Assert.assertEquals(claimValue, newClaimValue); | ||
} | ||
} |
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.
Refer the comment above. Have same concerns
...est/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAbstractIntegrationTest.java
Outdated
Show resolved
Hide resolved
PR builder started |
PR builder completed |
128d010
to
4412a64
Compare
PR builder started |
PR builder completed |
Add test cases Improve formatting Improve formatting Clean the code Restructre the architecture Reformat the code Revert unneccessary formatting Add new application logic Addressed the comments Integrate mock service Increase code readability Reformat the code Restructure the base architecture Add new test case to testng file Fix formatting issues Update the implementation Reset formatting Fix formatting issues Fix formatting issues Remove data providers Update snakeyaml dependency Reformat code Update the test atEnd method Change the order of execution of atEnd method Change the order of execution of atEnd method
e1d95d6
to
b6b9f89
Compare
PR builder started |
PR builder completed |
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.
Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/10596719407
Description
This adds integration tests for the pre issue access token action execution flow with the password grant type.
This covers the test cases for the following scenarios.
aud
claimexpires_in
claimA mock server has been set up using Wiremock to simulate the external service. The mock server runs locally on the port
8587
.Related Issue