Skip to content

[BUG] Backend integration tests fail on main due to PostgreSQL connection error #760

Description

@adityabhatkar23

Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0

Labels: bug, Stellar Wave

Backend integration tests fail on main because there's no PostgreSQL database for tests/integration/stream-lifecycle.test.ts to connect to.

Running npm test in the backend package errors out with Prisma connection failures:

Can't reach database server at 127.0.0.1:5432

The test explicitly uses a real Postgres db and falls back to postgresql://postgres:password@127.0.0.1:5432/flowfi_test when DATABASE_URL isn't set. On the GitHub Actions runner nothing is listening there, so CI is red on the default branch. Reproduces locally too if you don't have a test db configured.

What the fix has to hold to

  • Backend suite passes on main
  • Integration tests either get a real db or are gated so they don't fail when one isn't available

Done when

  • One of: Postgres is started and healthy before integration tests in CI, DATABASE_URL is set correctly in CI, or db-dependent tests are gated behind explicit setup
  • Backend CI is green on the default branch

Where to start
Look at the backend CI workflow and tests/integration/stream-lifecycle.test.ts. A Postgres service container in the workflow (plus the right DATABASE_URL) is the usual fix. Scope is CI config plus maybe test setup, not the streaming logic.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26Stellar WaveIssues in the Stellar wave programbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions