this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: Improve load_fixtures.sh error handling and fixture count

- Add check for database tables before loading fixtures
- Provide helpful error message directing users to use 'make test-db'
- Fix TOTAL_FIXTURES count from 24 to 26 (actual fixture count)

+26 -1
+26 -1
tests/load_fixtures.sh
··· 28 28 echo "Using BASE_URL: $BASE_URL" 29 29 echo "Using DB_PATH: $DB_PATH" 30 30 31 - TOTAL_FIXTURES=24 31 + # Check if database tables exist (for SQLite) 32 + if [ "$DRIVER" == "sqlite" ] || [ -z "$DRIVER" ]; then 33 + if [ -f "$DB_PATH" ]; then 34 + TABLE_CHECK=$(sqlite3 "$DB_PATH" "SELECT name FROM sqlite_master WHERE type='table' AND name='ircLink';" 2>/dev/null || echo "") 35 + if [ -z "$TABLE_CHECK" ]; then 36 + echo "" 37 + echo "ERROR: Database tables not found in $DB_PATH" 38 + echo "The server needs to run first to create the tables (GORM auto-migration)." 39 + echo "" 40 + echo "Try one of these options:" 41 + echo " 1. Use 'make test-db' to create a fresh test database with fixtures" 42 + echo " 2. Start the server first: ./bin/tumble conf/config.yaml &" 43 + echo " Then run: make load-fixtures" 44 + echo "" 45 + exit 1 46 + fi 47 + else 48 + echo "" 49 + echo "ERROR: Database file not found: $DB_PATH" 50 + echo "Use 'make test-db' to create a fresh test database with fixtures." 51 + echo "" 52 + exit 1 53 + fi 54 + fi 55 + 56 + TOTAL_FIXTURES=26 32 57 CURRENT=0 33 58 34 59 load_link() {