mirror of
https://github.com/hanzoai/insights-go.git
synced 2026-09-30 22:46:12 +00:00
1.0 KiB
1.0 KiB
Contributing
This package contains the PostHog Go SDK compliance adapter used with the PostHog SDK Test Harness.
Running tests
Tests run automatically in CI via GitHub Actions.
Locally with Docker Compose
Run the full compliance suite from the sdk_compliance_adapter directory:
docker-compose up --build --abort-on-container-exit
This will:
- Build the Go SDK adapter
- Pull the test harness image
- Run all compliance tests
- Show the results
Manually with Docker
# Create network
docker network create test-network
# Build and run adapter
docker build -f sdk_compliance_adapter/Dockerfile -t posthog-go-adapter .
docker run -d --name sdk-adapter --network test-network -p 8080:8080 posthog-go-adapter
# Run test harness
docker run --rm \
--name test-harness \
--network test-network \
ghcr.io/posthog/sdk-test-harness:latest \
run --adapter-url http://sdk-adapter:8080 --mock-url http://test-harness:8081
# Cleanup
docker stop sdk-adapter && docker rm sdk-adapter
docker network rm test-network