From 053a9e18cf7ca3dd92f223d9fbb909a655e1d4de Mon Sep 17 00:00:00 2001 From: Lars Date: Wed, 25 Mar 2026 09:54:44 +0100 Subject: [PATCH] fix: use postgres container for psql commands --- test-pipeline-backend.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/test-pipeline-backend.sh b/test-pipeline-backend.sh index 360eaae..36fffbc 100644 --- a/test-pipeline-backend.sh +++ b/test-pipeline-backend.sh @@ -7,45 +7,44 @@ echo "Pipeline-System Backend Tests" echo "═══════════════════════════════════════════════════════════" echo "" -# Container Name (from docker-compose.dev-env.yml) -CONTAINER="dev-mitai-api" -DB_HOST="postgres-dev" +# Container Names (from docker-compose.dev-env.yml) +POSTGRES_CONTAINER="dev-mitai-postgres" DB_USER="mitai_dev" DB_NAME="mitai_dev" echo "Test 1: Migration 019 ausgeführt" echo "─────────────────────────────────────────────────────────" -docker exec $CONTAINER psql -h $DB_HOST -U $DB_USER -d $DB_NAME -c \ +docker exec $POSTGRES_CONTAINER psql -U $DB_USER -d $DB_NAME -c \ "SELECT version, applied_at FROM schema_migrations WHERE version = '019';" echo "" echo "Test 2: Tabelle pipeline_configs existiert" echo "─────────────────────────────────────────────────────────" -docker exec $CONTAINER psql -h $DB_HOST -U $DB_USER -d $DB_NAME -c \ +docker exec $POSTGRES_CONTAINER psql -U $DB_USER -d $DB_NAME -c \ "\d pipeline_configs" | head -40 echo "" echo "Test 3: Seed-Daten (3 Configs erwartet)" echo "─────────────────────────────────────────────────────────" -docker exec $CONTAINER psql -h $DB_HOST -U $DB_USER -d $DB_NAME -c \ +docker exec $POSTGRES_CONTAINER psql -U $DB_USER -d $DB_NAME -c \ "SELECT name, is_default, active, stage2_prompt, stage3_prompt FROM pipeline_configs ORDER BY is_default DESC, name;" echo "" echo "Test 4: ai_prompts erweitert (is_system_default)" echo "─────────────────────────────────────────────────────────" -docker exec $CONTAINER psql -h $DB_HOST -U $DB_USER -d $DB_NAME -c \ +docker exec $POSTGRES_CONTAINER psql -U $DB_USER -d $DB_NAME -c \ "SELECT slug, is_system_default, (default_template IS NOT NULL) as has_default FROM ai_prompts WHERE slug LIKE 'pipeline_%' ORDER BY slug;" echo "" echo "Test 5: stage1_prompts Array-Inhalte" echo "─────────────────────────────────────────────────────────" -docker exec $CONTAINER psql -h $DB_HOST -U $DB_USER -d $DB_NAME -c \ +docker exec $POSTGRES_CONTAINER psql -U $DB_USER -d $DB_NAME -c \ "SELECT name, stage1_prompts FROM pipeline_configs WHERE name = 'Alltags-Check';" echo "" echo "Test 6: modules JSONB" echo "─────────────────────────────────────────────────────────" -docker exec $CONTAINER psql -h $DB_HOST -U $DB_USER -d $DB_NAME -c \ +docker exec $POSTGRES_CONTAINER psql -U $DB_USER -d $DB_NAME -c \ "SELECT name, jsonb_pretty(modules) as modules FROM pipeline_configs WHERE name = 'Alltags-Check';" echo ""