Files
defiQUG 1fb7266469 Add Oracle Aggregator and CCIP Integration
- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control.
- Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities.
- Created .gitmodules to include OpenZeppelin contracts as a submodule.
- Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment.
- Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks.
- Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring.
- Created scripts for resource import and usage validation across non-US regions.
- Added tests for CCIP error handling and integration to ensure robust functionality.
- Included various new files and directories for the orchestration portal and deployment scripts.
2025-12-12 14:57:48 -08:00
..

API Tests

This directory contains integration and contract tests for the eMoney Token Factory API.

Test Structure

test/api/
├── integration/          # Integration tests
│   ├── rest-api.test.ts
│   └── graphql.test.ts
└── contract/             # Contract validation tests
    ├── openapi-validation.test.ts
    └── event-schema-validation.test.ts

Running Tests

# Run all tests
pnpm test

# Run only integration tests
pnpm run test:integration

# Run only contract tests
pnpm run test:contract

# Watch mode
pnpm run test:watch

Test Types

Integration Tests

Test actual API endpoints against running services:

  • REST API operations
  • GraphQL queries and mutations
  • End-to-end flows

Contract Tests

Validate that implementations conform to specifications:

  • OpenAPI schema validation
  • AsyncAPI event schema validation
  • Request/response format validation

Mock Servers

Use mock servers for testing without requiring full infrastructure:

# 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:

export API_URL=http://localhost:3000
export GRAPHQL_URL=http://localhost:4000/graphql
export ACCESS_TOKEN=your-test-token