README
¶
Kafscale E2E Harness
These tests spin up a full cluster (via kind), install the local Helm chart, and hit the console API over a port-forward. They are opt-in because they require Docker/kind/helm on the host and take several minutes.
Prerequisites
- Docker daemon (Colima, Docker Desktop, etc.)
kind,kubectl, andhelmbinaries on your$PATH- Internet access to pull the Bitnami
etcdchart (the harness installs a single-node etcd for the operator)
Test Categories and Dependencies
Tests have different dependency requirements. Tests will skip gracefully if their dependencies aren't available.
| Category | MinIO | Docker | Kind | Make Target |
|---|---|---|---|---|
| Console tests | No | No | No | go test -run Console |
| Consumer group tests | No | No | No | make test-consumer-group |
| Ops API tests | No | No | No | make test-ops-api |
| MCP tests | No | No | No | make test-mcp |
| LFS proxy tests | No (fake S3) | No | No | make test-lfs-proxy-broker |
| Produce/consume tests | Yes | Yes | No | make test-produce-consume |
| Multi-segment durability | Yes | No | No | make test-multi-segment-durability |
| Kind cluster tests | No | Yes | Yes | Requires KAFSCALE_E2E_KIND=1 |
MinIO Dependency
Tests that require MinIO (produce/consume, durability) will automatically skip if MinIO isn't available:
=== RUN TestFranzGoProduceConsume
franz_test.go:42: MinIO not available at http://127.0.0.1:9000; run 'make ensure-minio' first or use 'make test-produce-consume'
--- SKIP: TestFranzGoProduceConsume (0.00s)
To run MinIO-dependent tests:
# Option 1: Use make targets (automatically starts MinIO)
make test-produce-consume
# Option 2: Start MinIO manually, then run tests
make ensure-minio
KAFSCALE_E2E=1 go test -tags=e2e ./test/e2e -run TestFranzGoProduceConsume -v
Running
KAFSCALE_E2E=1 go test -tags=e2e ./test/e2e -v
LFS Go SDK (Kind Cluster)
This test validates the Go SDK against a running Kind cluster (LFS proxy + Kafka + MinIO).
Required environment:
KAFSCALE_E2E=1KAFSCALE_E2E_KIND=1KAFSCALE_E2E_BROKER_ADDR(host:port for broker)LFS_PROXY_HTTP_URL(full URL), orLFS_PROXY_SERVICE_HOST+LFS_PROXY_HTTP_PORT+LFS_PROXY_HTTP_PATHKAFSCALE_LFS_PROXY_S3_BUCKETKAFSCALE_LFS_PROXY_S3_REGIONKAFSCALE_LFS_PROXY_S3_ENDPOINTKAFSCALE_LFS_PROXY_S3_ACCESS_KEYKAFSCALE_LFS_PROXY_S3_SECRET_KEYKAFSCALE_LFS_PROXY_S3_FORCE_PATH_STYLE(optional)
Run:
KAFSCALE_E2E=1 KAFSCALE_E2E_KIND=1 \
KAFSCALE_E2E_BROKER_ADDR=127.0.0.1:9092 \
LFS_PROXY_HTTP_URL=http://127.0.0.1:8080 \
KAFSCALE_LFS_PROXY_S3_BUCKET=kafscale \
KAFSCALE_LFS_PROXY_S3_REGION=us-east-1 \
KAFSCALE_LFS_PROXY_S3_ENDPOINT=http://127.0.0.1:9000 \
KAFSCALE_LFS_PROXY_S3_ACCESS_KEY=minioadmin \
KAFSCALE_LFS_PROXY_S3_SECRET_KEY=minioadmin \
go test -tags=e2e ./test/e2e -run TestLfsSDKKindE2E -v
Note: Running all tests with go test will skip tests whose dependencies aren't available. For complete test coverage, use make test-full.
For local developer workflows, prefer the Makefile targets:
make test-consumer-group # embedded etcd + in-memory S3
make test-ops-api # embedded etcd + in-memory S3
make test-mcp # MCP server tests
make test-lfs-proxy-broker # LFS proxy with fake S3
make test-multi-segment-durability # embedded etcd + MinIO
make test-produce-consume # MinIO-backed produce/consume suite
make test-full # unit tests + local e2e suites
Kind LFS SDK Helper Makefile
The Kind-based SDK test uses lfs-client-sdk/Makefile to orchestrate:
lfs-demo-up: start the LFS demo stack on Kind (keeps it running)pf-start: port-forward broker, LFS proxy HTTP, and MinIOtest-lfs-sdk-kind: run the Go SDK E2E test
Run all:
make -C lfs-client-sdk run-all
Stop port-forwards:
make -C lfs-client-sdk pf-stop
If you already ran make lfs-demo, ensure port-forwards are up before running the SDK test:
make -C lfs-client-sdk pf-start
make -C lfs-client-sdk test-lfs-sdk-kind
Optional Environment Variables
| Variable | Description |
|---|---|
KAFSCALE_KIND_CLUSTER |
Reuse an existing kind cluster without creating/deleting one |
KAFSCALE_S3_ENDPOINT |
MinIO endpoint (default: http://127.0.0.1:9000) |
KAFSCALE_E2E_DEBUG |
Enable verbose logging |
KAFSCALE_TRACE_KAFKA |
Enable Kafka protocol tracing |
KAFSCALE_E2E_OPEN_UI |
Open console UI in browser after test |
The harness installs everything into the kafscale-e2e namespace and removes it after the test (unless you reused a cluster).