Spaces:
Sleeping
Sleeping
Download scripts/run_tests.sh from cursorunlim/ledger-sg: direct link, hf CLI and curl.
- Browser
- Download file 511 Bytes
-
https://huggingface.co/spaces/cursorunlim/ledger-sg/resolve/main/scripts/run_tests.sh
- Command line
-
hf download hf://spaces/cursorunlim/ledger-sg/scripts/run_tests.sh
-
curl -L -o run_tests.sh https://huggingface.co/spaces/cursorunlim/ledger-sg/resolve/main/scripts/run_tests.sh
511 Bytes
| # File: /app/scripts/run_tests.sh | |
| set -e | |
| echo "🧪 Setting up test database..." | |
| export PGPASSWORD=ledgersg_secret_to_change | |
| # Drop test database if exists | |
| dropdb -h localhost -U ledgersg test_ledgersg_dev 2>/dev/null || true | |
| # Create test database | |
| createdb -h localhost -U ledgersg test_ledgersg_dev | |
| # Load schema | |
| psql -h localhost -U ledgersg -d test_ledgersg_dev -f /app/database_schema.sql | |
| echo "✓ Test database ready" | |
| # Run tests | |
| cd /app/apps/backend | |
| pytest --reuse-db --no-migrations |