Problem running tests on Azure Pipelines #39
-
I have a few tests that use testcontainers-keycloak that work just fine locally (on macOS). However, on Azure Pipelines the tests fail. The tests are for a custom token mapper. From what I can see, I think the extensions are not loaded (The test fail on the fact that the custom token that my extension adds is not present), although I load them using:
I enabled DEBUG logging and I do see this:
Especially this part I think is good:
I also have this in the logging:
So it looks like the extension is loaded. Is there anything else I can look at to further debug this? Note that on Azure, I am using a custom build agent running in Docker on an Ubuntu host. The custom build agent is started like this:
I have |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
According to https://www.testcontainers.org/supported_docker_environment/continuous_integration/dind_patterns/, I need to use Reading through the answers of https://stackoverflow.com/questions/31381322/docker-in-docker-cannot-mount-volume also leads me to believe that the "inner docker" that runs Keycloak cannot access the sources of the "outer docker" that is the build agent on Azure. There is also this documentation: Mounting volumes using Docker within a Docker container, but I don't quite understand if and how this applies to what I am trying to do. |
Beta Was this translation helpful? Give feedback.
-
Hi @wimdeblauwe, If you still have the issue, please test it with the most recent version. Perhaps this is related to this. |
Beta Was this translation helpful? Give feedback.
-
I have a similar issue, but in the opposite order. I'm using the testcontainer-keycloak ina local environment on Windows with Docker-Desktop runninm g on WSL2. With version 1.7.1 everything works perfect, but when i change to the current version 1.9.0 my SPI is not found:
My startup code is:
When I debug the keycloak startup i notice that |
Beta Was this translation helpful? Give feedback.
Hi @wimdeblauwe,
over the weekend, I released v1.9.0 of the Keycloak Testcontainers (based on KC16 as default KC version).
Now, the extensions are no more just "bind mounted" from the source directory to the container, but actually copied to it, see #44
If you still have the issue, please test it with the most recent version. Perhaps this is related to this.