Fix E2E test cases and setup for GHA (#26944)

* Fix E2E test cases and setup for GHA
* Fix more test cases, apply recommendations
Этот коммит содержится в:
Mario Vitale
2024-05-06 08:37:20 +02:00
коммит произвёл GitHub
родитель 8da64a5c34
Коммит c9cb3d5bb0
13 изменённых файлов: 45 добавлений и 22 удалений

Просмотреть файл

@@ -19,4 +19,13 @@ if ! mme2e_wait_service_healthy server 60 10; then
mme2e_log "Mattermost container not healthy, retry attempts exhausted. Giving up." >&2
exit 1
fi
for MIGRATION in migration_advanced_permissions_phase_2; do
# Query explanation: if it doesn't find the migration in the table, there are 0 results and the command fails with a divide-by-zero error. Otherwise the command succeeds
MIGRATION_CHECK_COMMAND="${MME2E_DC_SERVER} exec -T -- postgres psql -U mmuser mattermost_test -c \"select 1 / (select count(*) from Systems where name = '${MIGRATION}' and value = 'true');\""
if ! mme2e_wait_command_success "$MIGRATION_CHECK_COMMAND >/dev/null 2>&1" "Waiting for migration to be completed: ${MIGRATION}" "30" "10"; then
mme2e_log "Migration ${MIGRATION} not completed, retry attempts exhausted. Giving up." >&2
exit 2
fi
mme2e_log "${MIGRATION}: completed."
done
mme2e_log "Mattermost container is running and healthy"