diff --git a/Jenkinsfile b/Jenkinsfile index d86812ee..26629fb1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -229,8 +229,13 @@ pipeline { -d "grant_type=password&client_id=anexo76-frontend&username=${E2E_TEST_USER}&password=${E2E_TEST_PASSWORD}&scope=openid" \ 2>/dev/null || echo "000") echo "Keycloak token endpoint → HTTP ${KC_STATUS}" - if [ "$KC_STATUS" != "200" ]; then - echo "ERROR: Keycloak no accesible o password grant no habilitado (HTTP ${KC_STATUS})." + if [ "$KC_STATUS" = "401" ]; then + echo "ERROR 401 — Credenciales inválidas o Direct Access Grants deshabilitado." + echo " Verifica en Keycloak: Clients → anexo76-frontend → Settings → Direct access grants = ON" + echo " Verifica que el usuario '${E2E_TEST_USER}' exista en el realm y la contraseña sea correcta." + exit 1 + elif [ "$KC_STATUS" != "200" ]; then + echo "ERROR: Keycloak no accesible (HTTP ${KC_STATUS})." echo "URL: ${KC_TOKEN_EP}" exit 1 fi