8000 Move AuthorizationCodeTest to the new testsuite by lhanusov · Pull Request #49772 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Move AuthorizationCodeTest to the new testsuite - #49772

Merged
mposolda merged 1 commit into
keycloak:mainfrom
lhanusov:test-migration/authorizationcodetest
Jun 12, 2026
Merged

mposolda merged 1 commit into
keycloak:mainfrom
lhanusov:test-migration/authorizationcodetest

Conversation

@lhanusov
@lhanusov lhanusov commented Jun 8, 2026
Copy link
Copy Markdown
Contributor

Closes #48201

@lhanusov
lhanusov requested review from a team as code owners June 8, 2026 10:43
@lhanusov
lhanusov force-pushed the test-migration/authorizationcodetest branch from 92a65b3 to 3aa317c Compare June 8, 2026 10:44
@lhanusov lhanusov self-assigned this Jun 8, 2026
@lhanusov lhanusov added area/test-framework Test framework — infrastructure, Realm DSL, page objects, migration utils team/core-protocols labels Jun 8, 2026
@lhanusov
lhanusov force-pushed the test-migration/authorizationcodetest branch from 3aa317c to a5a8a82 Compare June 8, 2026 11:40
mposolda
mposolda previously approved these changes Jun 9, 2026
@mposolda mposolda left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lhanusov Thanks!

I would slightly prefer to use constants like OAuth2Constants.CODE , OAuth2Constants.ERROR , OAuth2Constants.RESPONSE instead of hardcoded strings like "code", "error" etc. But that is rather a minor thing, which can be improved in case there are more change requests for this PR. But I don't consider it blocker for the PR, so approving.

@lhanusov
lhanusov force-pushed the test-migration/authorizationcodetest branch from a5a8a82 to 1735aa9 Compare June 9, 2026 08:41
mposolda
mposolda previously approved these changes Jun 9, 2026
@mposolda mposolda left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approving. Thanks!

@stianst stianst left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should introduce isSuccess and isError in AuthorizationEndpointResponse?

The implementation would basically just be:

boolean isSuccess() {
  return isRedirected() && code != null;
}

boolean isError() {
   return isRedirected() && error != null;
}

That'd be a bit cleaner than having to do assertNotNull. As it's just

Assertions.assertTrue(oauth.parseLoginRepsonse().isSuccess();

@lhanusov
lhanusov force-pushed the test-migration/authorizationcodetest branch 2 times, most recently from fa52800 to bca23a3 Compare June 9, 2026 12:42
mposolda
mposolda previously approved these changes Jun 9, 2026
Signed-off-by: Lukas Hanusovsky <lhanusov@redhat.com>
@lhanusov
lhanusov force-pushed the test-migration/authorizationcodetest branch from bca23a3 to 309e608 Compare June 11, 2026 06:47
@keycloak-github-bot
Copy link
Copy Markdown

Unreported flaky test detected

If the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR.

org.keycloak.testsuite.saml.SamlClientTest#testLoginWithOIDCClient

Keycloak CI - Java Distribution IT (windows-latest - temurin - 17)

jakarta.ws.rs.ClientErrorException: HTTP 409 Conflict
	at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.handleErrorStatus(ClientInvocation.java:258)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.DefaultEntityExtractorFactory$3.extractEntity(DefaultEntityExtractorFactory.java:41)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invokeSync(ClientInvoker.java:146)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:104)
...

Report flaky test

org.keycloak.testsuite.saml.SamlClientTest#testLoginWithOIDCClient

Keycloak CI - Java Distribution IT (windows-latest - temurin - 21)

jakarta.ws.rs.ClientErrorException: HTTP 409 Conflict
	at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.handleErrorStatus(ClientInvocation.java:258)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.DefaultEntityExtractorFactory$3.extractEntity(DefaultEntityExtractorFactory.java:41)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invokeSync(ClientInvoker.java:146)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:104)
...

Report flaky test

org.keycloak.testsuite.saml.SamlClientTest#testLoginWithOIDCClient

Keycloak CI - Java Distribution IT (ubuntu-latest - temurin - 21)

jakarta.ws.rs.ClientErrorException: HTTP 409 Conflict
	at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.handleErrorStatus(ClientInvocation.java:258)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.DefaultEntityExtractorFactory$3.extractEntity(DefaultEntityExtractorFactory.java:41)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invokeSync(ClientInvoker.java:146)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:104)
...

Report flaky test

org.keycloak.testsuite.saml.SamlClientTest#testLoginWithOIDCClient

Keycloak CI - Java Distribution IT (ubuntu-latest - temurin - 17)

jakarta.ws.rs.ClientErrorException: HTTP 409 Conflict
	at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.handleErrorStatus(ClientInvocation.java:258)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.DefaultEntityExtractorFactory$3.extractEntity(DefaultEntityExtractorFactory.java:41)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invokeSync(ClientInvoker.java:146)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:104)
...

Report flaky test

@keycloak-github-bot keycloak-github-bot Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unreported flaky test detected, please review

@mposolda
mposolda merged commit eb85945 into keycloak:main Jun 12, 2026
89 checks passed
sashyo pushed a commit to tide-foundation/keycloak-IGA that referenced this pull request Jul 20, 2026
Closes keycloak#48201


Signed-off-by: Lukas Hanusovsky <lhanusov@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/test-framework Test framework — infrastructure, Realm DSL, page objects, migration utils flaky-test team/core-protocols

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate AuthorizationCodeTest

3 participants

0