Skip to content

Commit

Permalink
Merge pull request #22176 from Thisara-Welmilla/improve-pre-issue-acc…
Browse files Browse the repository at this point in the history
…ess-token-test

Improve test for pre issue access token with incomplete action invocation status.
  • Loading branch information
malithie authored Jan 19, 2025
2 parents ac4ecc9 + 81a7435 commit 3a3930e
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ public PreIssueAccessTokenActionFailureClientCredentialsGrantTestCase(TestUserMo
public static Object[][] getTestExecutionContext() throws Exception {

return new Object[][]{
{TestUserMode.SUPER_TENANT_USER, new ActionResponse(200,
FileUtils.readFileInClassPathAsString("actions/response/incomplete-response.json")),
new ExpectedTokenResponse(500, "server_error", "Internal Server Error.")},
{TestUserMode.SUPER_TENANT_USER, new ActionResponse(200,
FileUtils.readFileInClassPathAsString("actions/response/failure-response.json")),
new ExpectedTokenResponse(400, "Some failure reason", "Some description")},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ public PreIssueAccessTokenActionFailureCodeGrantTestCase(TestUserMode testUserMo
public static Object[][] getTestExecutionContext() throws Exception {

return new Object[][]{
{TestUserMode.SUPER_TENANT_USER, new ActionResponse(200,
FileUtils.readFileInClassPathAsString("actions/response/incomplete-response.json")),
new ExpectedTokenResponse(500, "server_error", "Internal Server Error.")},
{TestUserMode.SUPER_TENANT_USER, new ActionResponse(200,
FileUtils.readFileInClassPathAsString("actions/response/failure-response.json")),
new ExpectedTokenResponse(400, "Some failure reason", "Some description")},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ public PreIssueAccessTokenActionFailurePasswordGrantTestCase(TestUserMode testUs
public static Object[][] getTestExecutionContext() throws Exception {

return new Object[][]{
{TestUserMode.SUPER_TENANT_USER, new ActionResponse(200,
FileUtils.readFileInClassPathAsString("actions/response/incomplete-response.json")),
new ExpectedTokenResponse(500, "server_error", "Internal Server Error.")},
{TestUserMode.SUPER_TENANT_USER, new ActionResponse(200,
FileUtils.readFileInClassPathAsString("actions/response/failure-response.json")),
new ExpectedTokenResponse(400, "Some failure reason", "Some description")},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ public PreIssueAccessTokenActionFailureRefreshTokenGrantTestCase(TestUserMode te
public static Object[][] getTestExecutionContext() throws Exception {

return new Object[][]{
{TestUserMode.SUPER_TENANT_USER, new ActionResponse(200,
FileUtils.readFileInClassPathAsString("actions/response/incomplete-response.json")),
new ExpectedTokenResponse(500, "server_error", "Internal Server Error.")},
{TestUserMode.SUPER_TENANT_USER, new ActionResponse(200,
FileUtils.readFileInClassPathAsString("actions/response/failure-response.json")),
new ExpectedTokenResponse(400, "Some failure reason", "Some description")},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"actionStatus": "INCOMPLETE",
"operations": [
{
"op": "redirect",
"url": "testUrl"
}
]
}

0 comments on commit 3a3930e

Please sign in to comment.