-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
[#29412] DB Allocator removal - dependency cleanup. #29414
Conversation
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.
Unreported flaky test detected, please review
Unreported flaky test detectedIf 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.oid4vc.issuance.signing.OID4VCIssuerEndpointTest#testGetCredentialOfferUriUnsupportedCredential
org.keycloak.testsuite.oid4vc.issuance.signing.OID4VCIssuerEndpointTest#testGetCredentialOfferUriInvalidToken
org.keycloak.testsuite.oid4vc.issuance.signing.OID4VCIssuerEndpointTest#testRequestCredential
org.keycloak.testsuite.oid4vc.issuance.signing.OID4VCIssuerEndpointTest#testGetCredentialOfferUriUnauthorized
org.keycloak.testsuite.oid4vc.issuance.signing.OID4VCIssuerEndpointTest#testGetCredentialOfferUnauthorized
org.keycloak.testsuite.oid4vc.issuance.signing.OID4VCIssuerEndpointTest#testRequestCredentialInvalidToken
org.keycloak.testsuite.oid4vc.issuance.signing.OID4VCIssuerEndpointTest#testRequestCredentialUnauthorized
org.keycloak.testsuite.oid4vc.issuance.signing.OID4VCIssuerEndpointTest#testCredentialIssuance
org.keycloak.testsuite.oid4vc.issuance.signing.OID4VCIssuerEndpointTest#testGetCredentialOfferWithoutNonce
org.keycloak.testsuite.oid4vc.issuance.signing.OID4VCIssuerEndpointTest#testGetCredentialOffer
org.keycloak.testsuite.oid4vc.issuance.signing.OID4VCIssuerEndpointTest#testGetCredentialOfferWithABrokenNote
org.keycloak.testsuite.oid4vc.issuance.signing.OID4VCIssuerEndpointTest#testGetCredentialOfferURI
org.keycloak.testsuite.oid4vc.issuance.signing.OID4VCIssuerEndpointTest#testGetCredentialOfferWithoutAPreparedOffer
org.keycloak.testsuite.oid4vc.issuance.signing.OID4VCIssuerEndpointTest#testRequestCredentialUnsupportedFormat
org.keycloak.testsuite.oid4vc.issuance.signing.OID4VCIssuerEndpointTest#testRequestCredentialUnsupportedCredential
|
d0b0a88
to
93fd1a0
Compare
Unreported flaky test detectedIf 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.client.ClientTypesTest#testUpdateClientWithClientType
org.keycloak.testsuite.oauth.ClientTokenExchangeTest#testExchangeWithDynamicScopesEnabled
org.keycloak.testsuite.oauth.ClientTokenExchangeTest#testClientExchange
org.keycloak.testsuite.oauth.ClientTokenExchangeTest#testIntrospectTokenAfterImpersonation
org.keycloak.testsuite.oauth.ClientTokenExchangeTest#testPublicClientNotAllowed
org.keycloak.testsuite.oauth.ClientTokenExchangeTest#testExchangeUsingServiceAccount
org.keycloak.testsuite.oauth.ClientTokenExchangeTest#testImpersonation
org.keycloak.testsuite.oauth.ClientTokenExchangeTest#testImpersonationUsingPublicClient
|
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.
Unreported flaky test detected, please review
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.
Unreported flaky test detected, please review
Unreported flaky test detectedIf 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.client.ClientTypesTest#testUpdateClientWithClientType
org.keycloak.testsuite.oauth.ClientTokenExchangeTest#testExchangeWithDynamicScopesEnabled
org.keycloak.testsuite.oauth.ClientTokenExchangeTest#testClientExchange
org.keycloak.testsuite.oauth.ClientTokenExchangeTest#testIntrospectTokenAfterImpersonation
org.keycloak.testsuite.oauth.ClientTokenExchangeTest#testPublicClientNotAllowed
org.keycloak.testsuite.oauth.ClientTokenExchangeTest#testExchangeUsingServiceAccount
org.keycloak.testsuite.oauth.ClientTokenExchangeTest#testImpersonation
org.keycloak.testsuite.oauth.ClientTokenExchangeTest#testImpersonationUsingPublicClient
|
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.
Thank you for the PR @lhanusov, I see we still refer to the DB Allocator in docs. Could you please have a look whether it should be removed too?
Lines 56 to 118 in 2d05331
Using built-in profiles to run database tests using docker containers | |
------- | |
The project provides specific profiles to run database tests using containers. Below is a just a sample of implemented profiles. In order to get a full list, please invoke (`mvn help:all-profiles -pl testsuite/integration-arquillian | grep -- db- | grep -v allocator`): | |
* `db-mysql` | |
* `db-postgres` | |
As an example, to run tests using a MySQL docker container on Undertow auth-server: | |
mvn -f testsuite/integration-arquillian clean verify -Pdb-mysql | |
If you want to run tests using a pre-configured Keycloak distribution (instead of Undertow): | |
mvn -f testsuite/integration-arquillian clean verify -Pdb-mysql,jpa,auth-server-quarkus | |
Note that you must always activate the `jpa` profile when using auth-server-quarkus. | |
If the mvn command fails for any reason, it may also fail to remove the container which | |
must be then removed manually. | |
For Oracle databases, the images are not publicly available due to licensing restrictions. | |
Build the Docker image per instructions at | |
https://github.com/oracle/docker-images/tree/main/OracleDatabase. | |
Update the property `docker.database.image` if you used a different | |
name or tag for the image. | |
Note that Docker containers may occupy some space even after termination, and | |
especially with databases that might be easily a gigabyte. It is thus | |
advisable to run `docker system prune` occasionally to reclaim that space. | |
Using DB Allocator Service | |
------- | |
The testsuite can use the DB Allocator Service to allocate and release desired database automatically. | |
Since some of the database properties (such as JDBC URL, Username or Password) need to be used when building the Auth Server, | |
the allocation and deallocation need to happen when building the `integration-arquillian` project (instead of `tests/base` as | |
it happens in other cases). | |
In order to use the DB Allocator Service, you must use the `jpa` profile with one of the `db-allocator-*`. Here's a full example to | |
run JPA with Auth Server Quarkus and MSSQL 2016: | |
``` | |
mvn -f testsuite/integration-arquillian/pom.xml clean verify \ | |
-Pjpa,auth-server-quarkus,db-allocator-db-mssql2016 \ | |
-Ddballocator.uri=<<db-allocator-servlet-url>> \ | |
-Ddballocator.user=<<db-allocator-user>> \ | |
-Dmaven.test.failure.ignore=true | |
``` | |
Using `-Dmaven.test.failure.ignore=true` is not strictly required but highly recommended. After running the tests, | |
the DB Allocator Plugin should release the allocated database. | |
**NOTE**: If you killed the maven surefire test preliminary (for example with CTRL-C or `kill -9` command), it will be | |
good to manually release the allocated database. Please check `dballocator.uri` and add `?operation=report` to the end of the URL. | |
Find your DB in the GUI and release it manually. | |
Below is a just a sample of implemented profiles. In order to get a full list, please invoke (`mvn help:all-profiles -pl testsuite/integration-arquillian | grep -- db-allocator-db-`): | |
* `db-allocator-db-postgres` - for testing with Postgres 9.6.x | |
* `db-allocator-db-mysql` - for testing with MySQL 5.7 |
Signed-off-by: Lukas Hanusovsky <lhanusov@redhat.com>
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.
Unreported flaky test detected, please review
Unreported flaky test detectedIf 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.oauth.ClientTokenExchangeTest#testExchangeWithDynamicScopesEnabled
org.keycloak.testsuite.oauth.ClientTokenExchangeTest#testClientExchange
org.keycloak.testsuite.oauth.ClientTokenExchangeTest#testIntrospectTokenAfterImpersonation
org.keycloak.testsuite.oauth.ClientTokenExchangeTest#testPublicClientNotAllowed
org.keycloak.testsuite.oauth.ClientTokenExchangeTest#testExchangeUsingServiceAccount
org.keycloak.testsuite.oauth.ClientTokenExchangeTest#testImpersonation
org.keycloak.testsuite.oauth.ClientTokenExchangeTest#testImpersonationUsingPublicClient
org.keycloak.testsuite.client.ClientTypesTest#testUpdateClientWithClientType
|
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.
Thank you @lhanusov
Closes #29412