Add integration tests for execution persistence, metrics, and opportunity writing
CI / lint-test-build (push) Failing after 1m23s
CI / lint-test-build (push) Failing after 1m23s
- Implemented integration tests for the execution writer to ensure trade orders and PnL are persisted correctly. - Created integration tests for the metrics calculator to summarize execution data accurately. - Added integration tests for the opportunity writer to verify event persistence. - Established PostgreSQL schema validation tests to ensure all expected tables, columns, and constraints exist. - Removed outdated unit tests that relied on DuckDB and replaced them with tests using PgStore.
This commit is contained in:
+13
-13
@@ -7,16 +7,16 @@ This guide provides two supported deployment paths for Arbitrade on Coolify:
|
||||
|
||||
Reference docs:
|
||||
|
||||
- Coolify Applications: https://coolify.io/docs/applications
|
||||
- Coolify Build Packs: https://coolify.io/docs/applications/build-packs
|
||||
- Coolify Dockerfile Build Pack: https://coolify.io/docs/applications/build-packs/dockerfile
|
||||
- Coolify Nixpacks Build Pack: https://coolify.io/docs/applications/build-packs/nixpacks
|
||||
- Coolify CI/CD (Git providers): https://coolify.io/docs/applications/ci-cd
|
||||
- Coolify Gitea integration: https://coolify.io/docs/applications/ci-cd/gitea/integration
|
||||
- Coolify environment variables: https://coolify.io/docs/knowledge-base/environment-variables
|
||||
- Coolify persistent storage: https://coolify.io/docs/knowledge-base/persistent-storage
|
||||
- Coolify health checks: https://coolify.io/docs/knowledge-base/health-checks
|
||||
- Coolify Docker registry credentials: https://coolify.io/docs/knowledge-base/docker/registry
|
||||
- [Coolify Applications](https://coolify.io/docs/applications)
|
||||
- [Coolify Build Packs](https://coolify.io/docs/applications/build-packs)
|
||||
- [Coolify Dockerfile Build Pack](https://coolify.io/docs/applications/build-packs/dockerfile)
|
||||
- [Coolify Nixpacks Build Pack](https://coolify.io/docs/applications/build-packs/nixpacks)
|
||||
- [Coolify CI/CD (Git providers)](https://coolify.io/docs/applications/ci-cd)
|
||||
- [Coolify Gitea integration](https://coolify.io/docs/applications/ci-cd/gitea/integration)
|
||||
- [Coolify environment variables](https://coolify.io/docs/knowledge-base/environment-variables)
|
||||
- [Coolify persistent storage](https://coolify.io/docs/knowledge-base/persistent-storage)
|
||||
- [Coolify health checks](https://coolify.io/docs/knowledge-base/health-checks)
|
||||
- [Coolify Docker registry credentials](https://coolify.io/docs/knowledge-base/docker/registry)
|
||||
|
||||
## Common Runtime Configuration
|
||||
|
||||
@@ -32,14 +32,14 @@ Use these values in both deployment modes.
|
||||
|
||||
- Add a persistent volume
|
||||
- Mount path: `/app/data`
|
||||
- Set DB path to: `DUCKDB_PATH=/app/data/arbitrade.duckdb`
|
||||
- Set PG connection: `PG_HOST=postgres`, `PG_PORT=5432`, `PG_DATABASE=arbitrade`, `PG_USER=arbitrade`, `PG_PASSWORD=arbitrade`
|
||||
|
||||
### Required environment variables
|
||||
|
||||
- `APP_ENV=prod`
|
||||
- `APP_HOST=0.0.0.0`
|
||||
- `APP_PORT=9090`
|
||||
- `DUCKDB_PATH=/app/data/arbitrade.duckdb`
|
||||
- `PG_DATABASE=arbitrade`
|
||||
- `LOG_LEVEL=INFO`
|
||||
- `LOG_JSON=true`
|
||||
- `KRAKEN_API_KEY=<set-in-coolify-secret>`
|
||||
@@ -135,7 +135,7 @@ Update flow for new releases:
|
||||
- Ensure the deployed image/wheel includes package templates under `arbitrade/web/templates/*`.
|
||||
- If you build from source, do not remove packaged template files under `src/arbitrade/web/templates`.
|
||||
- DB resets after deploy:
|
||||
- Confirm persistent mount exists at `/app/data` and `DUCKDB_PATH` points there.
|
||||
- Confirm PostgreSQL is reachable at `PG_HOST`.
|
||||
- Registry pull fails:
|
||||
- Re-check Docker registry credentials in Coolify.
|
||||
- App starts but unavailable externally:
|
||||
|
||||
Reference in New Issue
Block a user