Handling external dependencies
This is a detailed discussion of how to handle your system’s dependencies for testing in Antithesis. Remember, testing happens in a hermetic testing environment with no internet access, because your software’s always wanted its own little Faraday cage.
For an overview of this topic, please read the Docker Setup guide or the Kubernetes Setup guide.
Approaches
Each of your software’s dependencies can be provided either as:
- An actual, containerized service, just like you’d use in production.
- A mock of the service, which could be pre-built (e.g., LocalStack), or something you write yourself. You’ll use this approach for external dependencies that can’t be containerized (e.g. AWS S3), or when the service provider hasn’t made docker images available.
Dependencies available off-the-shelf
This directory lists containerized open-source services and prebuilt mocks. You can include them in a Docker Compose file, or add the Kubernetes manifests for them.
If you’d like something added to this directory please let us know at support@antithesis.com.
Public Clouds
AWS
We recommend using the official AWS Emulator to handle all your AWS dependencies when testing in Antithesis.
Build the image according to the instructions in the Emulator docs, then simply upload the emulator alongside your other containers and add it to your docker-compose.yaml:
services: aws-emulator: image: aws-emulator container_name: aws-emulator hostname: aws-emulator platform: linux/amd64 init: true command: ["-p", "9297", "-t", "off"] deploy: resources: limits: memory: 2g volumes: - emulator-data:/home/emulator
volumes: emulator-data:Antithesis has also been extensively tested with both LocalStack and MinIO.
Azure
GCP
Open source dependencies
Any open source dependencies available on Docker Hub or any public registry can simply be uploaded to Antithesis along with your software. Here are some commonly used ones, If you’d like something added to this directory please let us know at support@antithesis.com.
Database & storage services
- Aerospike
- Cassandra
- ClickHouse
- Cockroach
- CouchDB
- ElasticSearch
- Grafana-loki
- Grafana-mimir
- InfluxDB
- Jaeger
- MariaDB
- Memcached
- MongoDB
- MySQL
- Neo4j
- Postgres
- Prometheus
- Redis
- Zookeeper
Messaging, queuing & mesh services
Other cloud native services
LLM services
Payment service mocks
Internal dependencies
If you own the dependency (for example a private container image), upload it to Antithesis with your software, then define it as a service in your Docker Compose file, or include a Kubernetes manifest for it.
Docker code for including dependencies
For containerized services or mocks
If you’ve uploaded your dependency or mock as a Docker image, just define it as a service in your Docker Compose file:
version: '3.8'
services: service.mysoftware: image: mysoftware:latest container_name: mysoftware hostname: mysoftware depends_on: - infra.postgres
infra.postgres: image: docker.io/postgres:16 container_name: postgres hostname: postgres environment: - POSTGRES_DB=postgres - POSTGRES_USER=user - POSTGRES_PASSWORD=password volumes: - postgres_data:/var/lib/postgresql/data ports: - "5432:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U user -d postgres"] interval: 5s timeout: 5s retries: 5 start_period: 10s
volumes: postgres_data:Kubernetes manifests for dependencies
For services or mocks
After you’ve uploaded the docker image your dependency or mock, just add a manifest for it in the manifests/ folder as discussed in the setup guide.
Below, you can find some example manifests for common dependencies.
LocalStack
LocalStack provides a Helm chart you can use to template and run your dependencies in Kubernetes.
Just add the helm chart:
helm repo add localstack https://localstack.github.io/helm-chartshelm repo updateCreate a values.yaml file to enable your dependencies. Here is an example one for S3:
fullnameOverride: localstackimage: tag: "3.5.0"startServices: "s3"persistence: enabled: true size: 5Gitests: enabled: falseextraEnvVars: - { name: LS_LOG, value: "warn" } - { name: SKIP_SSL_CERT_DOWNLOAD, value: "1" } - { name: DISABLE_EVENTS, value: "1" }Render to manifests/:
helm template localstack localstack/localstack \ -f values.yaml \ > manifests/localstack.yamlMinIO
MinIO is S3-compatible storage (not a mock). Use the Bitnami Helm chart to render a manifest.
Add the Bitnami Helm repo:
helm repo add bitnami https://charts.bitnami.com/bitnamihelm repo updateExample values.yaml file:
fullnameOverride: minioimage: tag: "2025"auth: rootUser: "minio" rootPassword: "minio-secret"defaultBuckets: "primary"persistence: enabled: true size: 5GiRender to manifests/:
helm template minio bitnami/minio \ -f values.yaml \ > manifests/minio.yamlWriting a mock yourself
Several tools are available to assist with writing your own mocks, if nothing in the provider’s ecosystem meets your needs.
This is a partial list:
If you’d like to explore this approach, we suggest emailing us at support@antithesis.com or reaching out on Discord.