This document collects the local development workflow and the repository's test entry points in one place.
- Go 1.25 or later
- Docker, for integration tests (including OAuth e2e tests)
- A local or reachable ClickHouse server, if you want to run
test-connectionmanually
Build the main binary:
go build -o altinity-mcp ./cmd/altinity-mcpCheck the current build:
./altinity-mcp versionValidate that the binary can reach ClickHouse before running broader tests:
./altinity-mcp test-connection \
--clickhouse-host localhost \
--clickhouse-port 8123 \
--clickhouse-database defaultRun the default repository test suite:
go test ./...This is the baseline command for day-to-day work. It runs unit tests plus the Docker-backed integration tests that are enabled by default in the repository.
Run package tests only:
go test ./pkg/...Run CLI and HTTP handler tests:
go test -v ./cmd/altinity-mcp/...Run OAuth-focused tests only:
go test ./pkg/server ./cmd/altinity-mcp ./pkg/config -run OAuth -count=1 -vSeveral tests start temporary ClickHouse containers with testcontainers-go. Before running them, make sure Docker is running and the current user can access the Docker socket.
If Docker is unavailable, the default suite will not be reliable.
OAuth e2e tests validate bearer-token forwarding through MCP to ClickHouse. They use a lightweight in-process mock OIDC provider and an altinity/clickhouse-server:25.8.16.20001.altinityantalya container (required for token_processors support — standard ClickHouse images do not include it).
These tests run automatically as part of go test ./... (skipped with -short).
For configuration background and provider-specific setup, see oauth_authorization.md.
For a typical code change:
- Build the binary with
go build -o altinity-mcp ./cmd/altinity-mcp - Run focused tests for the area you changed
- Run
go test ./... - OAuth e2e tests run automatically — no extra flags needed
- Verify Docker is running
- Verify container pulls are allowed from the current environment
- Re-run the failing package with
-vto see which container-backed test failed
The OAuth e2e tests require the Antalya ClickHouse build (altinity/clickhouse-server:25.8.16.20001.altinityantalya). Standard upstream images do not provide the token_processors support these tests depend on. The test pulls this image automatically via testcontainers.