From 621a8bc8e1896f82f25f4d315bf3b8a18ce027ca Mon Sep 17 00:00:00 2001 From: Patrick de Ruiter Date: Fri, 26 Dec 2025 00:53:28 +0100 Subject: [PATCH] Fix service account password parsing in tests --- tests/test-container.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test-container.sh b/tests/test-container.sh index ca9ac1c..e551058 100755 --- a/tests/test-container.sh +++ b/tests/test-container.sh @@ -276,11 +276,12 @@ test_user_authentication() { test_service_account_search() { log_info "Testing service account can search users..." - # Get keycloak password from the container - local keycloak_pass=$(docker exec "$CONTAINER_NAME" cat /var/lib/openldap/service-passwords.txt 2>/dev/null | grep keycloak | cut -d: -f2 | tr -d ' ') + # Get keycloak password from the container (format: LDAP_SERVICE_KEYCLOAK_PASSWORD=xxx) + local keycloak_pass=$(docker exec "$CONTAINER_NAME" cat /var/lib/openldap/service-passwords.txt 2>/dev/null | grep "LDAP_SERVICE_KEYCLOAK_PASSWORD=" | cut -d'=' -f2) if [ -z "$keycloak_pass" ]; then log_fail "Could not retrieve keycloak service account password" + docker exec "$CONTAINER_NAME" cat /var/lib/openldap/service-passwords.txt 2>/dev/null || echo "Password file not found" return 1 fi