Testing
Unit tests
make test
This runs pytest tests/ -v. Unit tests cover the SDK behavior without requiring
Docker or a running KBS instance.
End-to-end tests
The e2e/ directory contains a self-contained test harness.
Prerequisites: Docker with Compose support.
cd e2e
make test # insecure: KBS + echo-plugin, 5 tests
make test-tls # TLS: KBS verifies echo-plugin cert, same 5 tests
make test builds KBS from source on first run (several minutes). Subsequent runs
reuse the cached image.
make test-tls additionally generates a CA + leaf certificate pair and configures
KBS to connect to the plugin over TLS.
e2e Makefile targets
| Target | Description |
|---|---|
make build |
Build KBS and echo-plugin images |
make certs |
Generate TLS cert chain for the echo plugin |
make up |
Start services in the background (insecure) |
make up-tls |
Start services in the background (TLS) |
make test |
up + run tests + down |
make test-tls |
certs + up-tls + run tests + down |
make down |
Stop and remove containers |
make logs |
Follow container logs |