The test suite covers authentication (JWT and SPIFFE), the crypto layer (cipher operations, caching materials manager, AWS KMS provider, and GCP KMS provider), proxy routing and workload dispatch, and configuration validation. Tests use the standard GoDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/temporal-sa/temporal-cloud-proxy/llms.txt
Use this file to discover all available pages before exploring further.
testing package with testify assertions and are organized by package to mirror the source layout.
Test Commands
TheMakefile provides a complete set of test targets. All targets run against the entire module (./...) unless noted otherwise.
Package-Specific Tests
Run tests for a single package when you are iterating on a specific component:There is also a
make test-utils target (go test ./utils/...) for running tests in the utils package.Coverage
Generate a per-file coverage profile and open it in your browser to identify untested code paths:auth, crypto, and proxy packages where business logic is concentrated.
Race Detection
The-race flag instruments memory accesses at runtime and reports any concurrent read/write conflicts:
Benchmarks
Thecrypto package contains dedicated benchmark functions in benchmark_test.go. The benchmarks cover encryption, decryption, and full encrypt-then-decrypt cycles with and without the LRU key cache enabled, allowing you to measure the impact of caching on KMS call latency.
Run benchmarks for the crypto package specifically to focus on KMS-related measurements:
The crypto benchmarks require a real AWS KMS key. They check for the
KMS_KEY_ID and AWS_REGION environment variables at startup and call b.Skip(...) automatically if they are not set — so the standard make test target will skip them safely in environments without AWS credentials.crypto package):
CI
All tests run automatically on every push and every pull request via the GitHub Actions CI workflow. Thetest job sets up Go 1.24 and executes go test -v ./..., reporting per-test pass/fail output directly in the pull request checks.