chore: add pipeline system test scripts (Issue #28)
Deploy Development / deploy (push) Successful in 44s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 14s

This commit is contained in:
Lars committed 2026-03-25 09:47:58 +01:00
1 parent 6627b5eee7
commit 7f7edce62d
2 files changed
+119

No files matched your search

+51
View File
@@ -0,0 +1,51 @@
#!/bin/bash
# Test-Script für Pipeline-System Backend (Issue #28)
# Ausführen auf Server: bash test-pipeline-backend.sh
echo "═══════════════════════════════════════════════════════════"
echo "Pipeline-System Backend Tests"
echo "═══════════════════════════════════════════════════════════"
echo ""
# Container Name
CONTAINER="bodytrack-dev_backend_1"
echo "Test 1: Migration 019 ausgeführt"
echo "─────────────────────────────────────────────────────────"
docker exec $CONTAINER psql -h db -U bodytrack -d bodytrack -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 -U bodytrack -d bodytrack -c \
"\d pipeline_configs" | head -40
echo ""
echo "Test 3: Seed-Daten (3 Configs erwartet)"
echo "─────────────────────────────────────────────────────────"
docker exec $CONTAINER psql -h db -U bodytrack -d bodytrack -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 -U bodytrack -d bodytrack -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 -U bodytrack -d bodytrack -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 -U bodytrack -d bodytrack -c \
"SELECT name, jsonb_pretty(modules) as modules FROM pipeline_configs WHERE name = 'Alltags-Check';"
echo ""
echo "═══════════════════════════════════════════════════════════"
echo "Alle DB-Tests abgeschlossen!"
echo "═══════════════════════════════════════════════════════════"