End-to-end integration tests for the ap CLI, validating commands against real gateway and MCP server infrastructure.
- Go 1.25.1 or later
- Docker and Docker Compose
- Network access to pull Docker images
Important notes:
-
Docker Compose: the test runner uses the
docker compose up --waitflag which requires Docker Compose v2 (thedocker composeplugin). Ensure your Docker installation provides Compose v2+; olderdocker-composebinaries without the--waitflag will not work. -
Configuration backup: the integration suite will temporarily back up your real CLI config file (
~/.wso2ap/config.yaml) to~/.wso2ap/config.yaml.backupand write a clean config during test execution. The original config will be restored after the suite finishes (whether tests pass or fail). If you rely on a custom local config, please be aware of this behavior.
# Run all integration tests
make test
# Clean up containers and logs
make clean
# Install dependencies
make depsTests can be enabled/disabled by editing test-config.yaml:
tests:
gateway:
manage:
- id: GW-MANAGE-001
name: gateway add with valid parameters
enabled: true # Set to false to skip
requires: [CLI, GATEWAY]cli/it/
├── test-config.yaml # Enable/disable tests
├── features/ # Gherkin feature files
│ └── gateway/
├── steps/ # Step definitions
├── resources/ # Test resources
│ └── gateway/
└── logs/ # Test logs (git-ignored)
| ID | Component | Description |
|---|---|---|
CLI |
CLI Binary | The ap binary built from cli/src/ |
GATEWAY |
Gateway Stack | Docker Compose services: controller, router, policy-engine |
MCP_SERVER |
MCP Server | MCP backend for generate command tests |
Each test writes to a separate log file in logs/:
logs/GW-MANAGE-001-gateway-add.loglogs/GW-API-001-api-list.loglogs/PHASE-1.log(Phase 1 infrastructure setup)- etc.
See INTEGRATION-TESTS.md for detailed documentation.