Closed jmax01 closed 1 year ago
You can mitigate version conflicts with setting an explicit Keycloak image when creating the container, e.g. new KeycloakContainer("quay.io/keycloak/keycloak:18.0.0");
This way, the testcontainer doesn't use the most recent default image, like specified in the code.
Additionally, when using the keycloak-admin-client
dependency, you can exclude the default one and add the desired version to your dependency list.
That only works if the commands/flags in KeycloakContainer stay the same between versions.
To me it seems safer and more user friendly to keep MAJOR and MINOR versions incrementing with keycloak's.
Maybe getKeycloakVersion()
can be made public instead of protected, so we can at least easily check if the provided version is the desired one?
I decided against aligning the testcontainers-keycloak
extension with Keycloak versioning. I'd would clash if we need a patch/minor update of this lib and shortly after this, Keycloak would publish a patch or minor release.
But FWIW, I made the method getKeycloakDefaultVersion()
public, as mentioned by @markbanierink
Description
Please rev the major version instead of the minor version for new major versions of keycloak.
Teams that rely on automated dependency management tools (dependabot, etc) most often set these tools to update by minor version since the majority of projects follow Semver versioning schemes.
The current versioning scheme is incompatible with Semver leading teams to perform workarounds for testcontainers-keycloak.
Motivation
No response
Details
No response