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

fix(keycloak): realm import #584

Merged

Conversation

sebassz
Copy link
Contributor

@sebassz sebassz commented May 27, 2024

With the option to import keycloak realms, introduced with #565, the_configure() method is called twice. Once it is called in the start() method of keycloak itself and then it is called a second time in the start() method of DockerContainer. This wasn't an issue so far. But if a realm shall be imported (self.has_realm_import in keycloak is True), then every time the string " --import-realm" is added to the start command in the _configure() method. The keycloak container won't start if "--import-realm" is specified multiple times.
This is probably the easiest solution to solve the issue. If wished, I can also work on a more robust solution, e.g. by storing the start command in a list and checking that "--import-realm" is only added once.

@alexanderankin alexanderankin merged commit 111bd09 into testcontainers:main May 27, 2024
12 checks passed
alexanderankin pushed a commit that referenced this pull request May 31, 2024
🤖 I have created a release *beep* *boop*
---


##
[4.5.1](testcontainers-v4.5.0...testcontainers-v4.5.1)
(2024-05-31)


### Bug Fixes

* **k3s:** add configuration parameter for disabling cgroup mount to
avoid "unable to apply cgroup configuration"
([#592](#592))
([8917772](8917772))
* **keycloak:** realm import
([#584](#584))
([111bd09](111bd09))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

2 participants