| name | kind-cluster |
| description | Use when setting up, running, or tearing down a Kind cluster for smee-sidecar system tests, or when system tests fail in CI |
Kind Cluster for System Tests
Overview
System tests deploy the sidecar into a Kind cluster and verify event relaying,
health check round-trips, liveness probe failure/recovery, and file-based health
status across six phases.
When to Use
- Running system tests locally
- Debugging system test failures in CI
- Iterating on sidecar behavior with a real Kubernetes environment
Prerequisites
kind, kubectl, podman (or docker), and curl (used by run-system-test.sh).
Quick Setup
kind create cluster --name smee-test
podman build -t smee-sidecar-test:latest .
podman save smee-sidecar-test:latest -o /tmp/smee-sidecar.tar
kind load image-archive /tmp/smee-sidecar.tar --name smee-test
kubectl apply -f test/config/system-test-setup.yaml
kubectl wait --for=condition=Available deployment/smee-server --timeout=60s
kubectl wait --for=condition=Available deployment/smee-client --timeout=60s
test/scripts/run-system-test.sh
What Gets Deployed
test/config/system-test-setup.yaml creates:
- smee-server — gosmee server on port 3333, exposed via service on port 80
- smee-client + sidecar — gosmee client forwarding to
localhost:8080
(the sidecar). Shared emptyDir volume at /shared
- dummy-downstream — echo server logging received requests on port 8080
Pod runs as non-root 65532, read-only root filesystem, fsGroup: 65532.
Test Phases
The test (test/scripts/run-system-test.sh) runs six phases (0 through 5):
- Verify probe scripts exist and are executable
- Initial health (0 restarts, metric=1, file
success) and event relaying to dummy-downstream
- Scale down smee-server to break communication
- Health degrades (metric=0, file
failure); gosmee-client restarts (its liveness probe runs check-smee-health.sh on the shared health file — the test watches containerStatuses[0], not the sidecar container)
- Restore smee-server
- Recovery, stability, and ongoing health-file updates
Tear Down
kind delete cluster --name smee-test
Common Mistakes