Fix service account password parsing in tests
All checks were successful
CI Pipeline / lint (push) Successful in 18s
CI Pipeline / build (push) Successful in 39s
CI Pipeline / test (push) Successful in 1m4s
CI Pipeline / security-scan (push) Successful in 1m17s
CI Pipeline / push (push) Successful in 15s
CI Pipeline / update-cd (push) Has been skipped
All checks were successful
CI Pipeline / lint (push) Successful in 18s
CI Pipeline / build (push) Successful in 39s
CI Pipeline / test (push) Successful in 1m4s
CI Pipeline / security-scan (push) Successful in 1m17s
CI Pipeline / push (push) Successful in 15s
CI Pipeline / update-cd (push) Has been skipped
This commit is contained in:
parent
3b8d3a0e85
commit
621a8bc8e1
@ -276,11 +276,12 @@ test_user_authentication() {
|
|||||||
test_service_account_search() {
|
test_service_account_search() {
|
||||||
log_info "Testing service account can search users..."
|
log_info "Testing service account can search users..."
|
||||||
|
|
||||||
# Get keycloak password from the container
|
# 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 keycloak | cut -d: -f2 | tr -d ' ')
|
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
|
if [ -z "$keycloak_pass" ]; then
|
||||||
log_fail "Could not retrieve keycloak service account password"
|
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
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user