Description
Backend integration tests are failing on the default branch because the PostgreSQL database required by stream-lifecycle.test.ts is unavailable during test execution.
Steps to Reproduce
- Check out the current
main branch.
- Navigate to the backend package.
- Run:
- Observe failures in
tests/integration/stream-lifecycle.test.ts.
Expected Behavior
The backend test suite should pass on the default branch, with integration tests able to connect to the required PostgreSQL test database.
Actual Behavior
Integration tests fail with Prisma database connection errors:
Can't reach database server at 127.0.0.1:5432
The failures originate from tests/integration/stream-lifecycle.test.ts, which uses a real PostgreSQL database.
Screenshots
See attached GitHub Actions failure logs.
Environment
- FlowFi Version: Current
main branch
- Browser: N/A
- Operating System: GitHub Actions Linux runner (also reproducible locally without a configured test database)
- Node.js Version: As configured by CI
- Wallet: N/A
Component
Logs/Error Messages
PrismaClientInitializationError:
Can't reach database server at 127.0.0.1:5432
Please make sure your database server is running at 127.0.0.1:5432
Test file:
tests/integration/stream-lifecycle.test.ts
Additional Context
The test file explicitly states that it uses a real PostgreSQL database:
/**
* These tests use real Postgres database
*/
and falls back to:
postgresql://postgres:password@127.0.0.1:5432/flowfi_test
when DATABASE_URL is not provided.
The issue is currently causing backend CI failures on the default branch.
Possible Solution
Investigate the CI test environment and ensure that:
- PostgreSQL is started and healthy before integration tests run, or
DATABASE_URL is configured correctly in CI, or
- Integration tests that require a real database are gated behind explicit setup steps.
Description
Backend integration tests are failing on the default branch because the PostgreSQL database required by
stream-lifecycle.test.tsis unavailable during test execution.Steps to Reproduce
mainbranch.npm testtests/integration/stream-lifecycle.test.ts.Expected Behavior
The backend test suite should pass on the default branch, with integration tests able to connect to the required PostgreSQL test database.
Actual Behavior
Integration tests fail with Prisma database connection errors:
The failures originate from
tests/integration/stream-lifecycle.test.ts, which uses a real PostgreSQL database.Screenshots
See attached GitHub Actions failure logs.
Environment
mainbranchComponent
Logs/Error Messages
Test file:
Additional Context
The test file explicitly states that it uses a real PostgreSQL database:
and falls back to:
postgresql://postgres:password@127.0.0.1:5432/flowfi_testwhen
DATABASE_URLis not provided.The issue is currently causing backend CI failures on the default branch.
Possible Solution
Investigate the CI test environment and ensure that:
DATABASE_URLis configured correctly in CI, or