File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
modules/keycloak/testcontainers/keycloak Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1717
1818from keycloak import KeycloakAdmin
1919from testcontainers .core .container import DockerContainer
20- from testcontainers .core .waiting_utils import wait_container_is_ready
20+ from testcontainers .core .waiting_utils import wait_container_is_ready , wait_for_logs
2121
2222# Since Keycloak v26.0.0
2323# See: https://www.keycloak.org/server/all-config#category-bootstrap_admin
@@ -94,6 +94,9 @@ def _readiness_probe(self) -> None:
9494 except requests .exceptions .ConnectionError :
9595 response = requests .get (f"{ self .get_url ()} /health/ready" , timeout = 1 )
9696 response .raise_for_status ()
97+ if "start-dev" in self ._command :
98+ wait_for_logs (self , "started in \\ d+\\ .\\ d+s" )
99+ wait_for_logs (self , f"Created temporary admin user|Added user '" )
97100
98101 def start (self ) -> "KeycloakContainer" :
99102 super ().start ()
You can’t perform that action at this time.
0 commit comments