Skip to content
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

How to adjust "auth-server-url" at runtime #11

Closed
NiklasA opened this issue Jan 29, 2021 · 2 comments
Closed

How to adjust "auth-server-url" at runtime #11

NiklasA opened this issue Jan 29, 2021 · 2 comments

Comments

@NiklasA
Copy link

NiklasA commented Jan 29, 2021

Hi @dasniko,

I really like your Keycloak Testcontainer. Is there an easy way to adjust the "keycloak.auth-server-url" property in my "application.yaml" in my integration tests at runtime? Because otherwise, my application does not know how it could validate e.g. a given access token.

My workaround was to customize your Java class "KeycloakContainer" and change this class to extend FixedHostPortGenericContainer instead of GenericContainer. However, it seems to me that I should not be the only one (hopefully ;-) with this problem.

My current project setup:

  • Spring Boot (Java)
  • Spock testing framework (Groovy)

Thank you in advance.

BR
Niklas

@dasniko
Copy link
Owner

dasniko commented Jan 29, 2021

Hi Niklas,
Happy to hear that you like the Keycloak Testcontainer.

So, your question is about how to configure your application framework and its testing resources, not about Keycloak Testcontainers, as this is a general requirement when using Testcontainers, nothing special with the Keycloak Testcontainer (e.g when using DB testcontainers, you also have to adjust host/port/credentials somehow).

For Spring based applications, I already answered this in this comment. It‘s always a good thing to know the used stack and its testing possibilities. 😉

@dasniko
Copy link
Owner

dasniko commented Feb 7, 2021

Closing this issue as there is no feedback.

@dasniko dasniko closed this as completed Feb 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants