feat: bridges, PMM, flash workflow, token-aggregation, and deployment docs
- CCIP/trustless bridge contracts, GRU tokens, DEX/PMM tests, reserve vault. - Token-aggregation service routes, planner, chain config, relay env templates. - Config snapshots and multi-chain deployment markdown updates. - gitignore services/btc-intake/dist/ (tsc output); do not track dist. Run forge build && forge test before deploy (large solc graph). Made-with: Cursor
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
# API Tests
|
||||
|
||||
This directory contains integration and contract tests for the eMoney Token Factory API.
|
||||
This directory contains reference contract tests and opt-in integration smoke tests for the eMoney control-plane API surface.
|
||||
|
||||
The default repo validation pass does not start an external REST or GraphQL control-plane service, so the integration suites are intentionally opt-in.
|
||||
|
||||
## Test Structure
|
||||
|
||||
```
|
||||
test/api/
|
||||
├── integration/ # Integration tests
|
||||
test/emoney/api/
|
||||
├── integration/ # Optional smoke tests against an external API service
|
||||
│ ├── rest-api.test.ts
|
||||
│ └── graphql.test.ts
|
||||
└── contract/ # Contract validation tests
|
||||
@@ -14,6 +16,8 @@ test/api/
|
||||
└── event-schema-validation.test.ts
|
||||
```
|
||||
|
||||
Reference API specs used by the contract tests live under `test/api/packages/`.
|
||||
|
||||
## Running Tests
|
||||
|
||||
```bash
|
||||
@@ -39,6 +43,13 @@ Test actual API endpoints against running services:
|
||||
- GraphQL queries and mutations
|
||||
- End-to-end flows
|
||||
|
||||
Enable them explicitly:
|
||||
|
||||
```bash
|
||||
export RUN_EMONEY_API_INTEGRATION=1
|
||||
export RUN_EMONEY_GRAPHQL_INTEGRATION=1
|
||||
```
|
||||
|
||||
### Contract Tests
|
||||
|
||||
Validate that implementations conform to specifications:
|
||||
@@ -48,25 +59,10 @@ Validate that implementations conform to specifications:
|
||||
|
||||
## Mock Servers
|
||||
|
||||
Use mock servers for testing without requiring full infrastructure:
|
||||
|
||||
```bash
|
||||
# Start all mock servers
|
||||
cd api/tools/mock-server
|
||||
pnpm run start:all
|
||||
|
||||
# Or start individually
|
||||
pnpm run start:rest # REST API mock (port 4010)
|
||||
pnpm run start:graphql # GraphQL mock (port 4020)
|
||||
```
|
||||
|
||||
## Test Environment
|
||||
|
||||
Set environment variables:
|
||||
Mock server tooling is not checked into this monorepo checkout. If you have an external mock or implementation, point the integration tests at it with environment variables.
|
||||
|
||||
```bash
|
||||
export API_URL=http://localhost:3000
|
||||
export GRAPHQL_URL=http://localhost:4000/graphql
|
||||
export ACCESS_TOKEN=your-test-token
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user