Current behavior:
Unit tests exist but no end-to-end test spanning merchant → payment → settlement → webhook.
Expected behavior:
Write integration test using test PostgreSQL and Redis (testcontainers or docker-compose). Flow: create merchant, initiate payment, complete payment, trigger settlement, verify settlement processed with correct fees, simulate webhook delivery. Mock Stellar RPC and CoinGecko. Run in CI.
Files to modify:
- New test file:
services/api-gateway/tests/integration/payment-to-settlement.test.ts
- CI configuration
Test requirements:
Single test covers the full flow with assertions at each step.
Acceptance criteria:
- End-to-end integration test passes in CI.
- Covers the critical payment-to-settlement path.
Current behavior:
Unit tests exist but no end-to-end test spanning merchant → payment → settlement → webhook.
Expected behavior:
Write integration test using test PostgreSQL and Redis (testcontainers or docker-compose). Flow: create merchant, initiate payment, complete payment, trigger settlement, verify settlement processed with correct fees, simulate webhook delivery. Mock Stellar RPC and CoinGecko. Run in CI.
Files to modify:
services/api-gateway/tests/integration/payment-to-settlement.test.tsTest requirements:
Single test covers the full flow with assertions at each step.
Acceptance criteria: