You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/testing.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,15 @@ The local environment includes MQTT benchmark tooling for smoke runs and
19
19
operator-driven benchmark runs. These tests report the observed behavior of the
20
20
current deployment; they do not define product targets.
21
21
22
-
**Prerequisite:** Performance and benchmark targets require MetalLB or an equivalent LoadBalancer (installed by `make setup-infra`). Without it, `kubectl port-forward` cannot sustain benchmark throughput and tests fail silently.
22
+
**Prerequisite:** Performance and benchmark targets require MetalLB or an
23
+
equivalent LoadBalancer installed by `make setup-infra`. On macOS, start
24
+
`docker-mac-net-connect` so the host can reach the MetalLB IPs. Linux hosts
25
+
normally reach the Docker bridge IPs directly.
26
+
27
+
Full benchmark targets are sensitive to local host capacity. When they report
28
+
EOFs, readloop stalls, or success-rate misses, capture host CPU and Kubernetes
29
+
pod metrics with the run; the smoke targets are the portable local validation
30
+
path.
23
31
24
32
The MQTT performance suite exercises combinations of QoS level, retention, and
**Prerequisite:** Performance and benchmark targets require MetalLB or an equivalent LoadBalancer (installed by `make setup-infra`). Without it, `kubectl port-forward` cannot sustain benchmark throughput and tests fail silently.
553
+
**Prerequisite:** Performance and benchmark targets require MetalLB or an
554
+
equivalent LoadBalancer installed by `make setup-infra`. On macOS, start
555
+
`docker-mac-net-connect` so the host can reach the MetalLB IPs. Linux hosts
556
+
normally reach the Docker bridge IPs directly.
554
557
555
558
The MQTT performance suite exercises combinations of QoS level, retention, and deployment topology (local and federated, both directions).
556
559
@@ -581,9 +584,11 @@ Most software integrations should use OAuth2. BMS, OT, and device integrations c
@@ -110,13 +111,13 @@ check-e2e-env: ## Check local Kind/NATS prerequisites for e2e tests
110
111
done
111
112
112
113
test-functional: check-e2e-env ## Run functional tests (MQTT + federation)
113
-
./infra/scripts/with-gateway-port-forwards.sh sh -c 'cd mqtt-client && go test -count=1 -v ./tests/functional/ -timeout 60s'
114
+
cd mqtt-client && go test -count=1 -v ./tests/functional/ -timeout 60s
114
115
115
116
test-performance: check-e2e-env ## Run performance e2e smoke tests
116
-
./infra/scripts/with-gateway-port-forwards.sh sh -c 'cd mqtt-client && $(PERFORMANCE_E2E_ENV) go test -count=1 -v ./tests/performance/ -timeout 10m'
117
+
cd mqtt-client &&$(PERFORMANCE_E2E_ENV) go test -count=1 -v ./tests/performance/ -timeout 10m
117
118
118
119
dummy-bms: check-e2e-env ## Publish looping dummy BMS data to the CSC MQTT broker
119
-
./infra/scripts/with-gateway-port-forwards.sh sh -c 'cd mqtt-client && go run ./cmd/dummy-bms --broker "$$CSC_BROKER_URL" --csv examples/dsx_exemplar.csv --schema ../../schemas/asyncapi/bms/bms.yaml'
120
+
cd mqtt-client && go run ./cmd/dummy-bms --broker "$(CSC_BROKER_URL)" --csv examples/dsx_exemplar.csv --schema ../../schemas/asyncapi/bms/bms.yaml
120
121
121
122
validate-nats: ## Validate NATS deployment on all clusters
benchmark-basic: check-e2e-env ## Run MQTT benchmark basic suite
159
-
./infra/scripts/with-gateway-port-forwards.sh sh -c 'cd mqttbs && go run ./cmd/mqttbs run basic-suite --broker "$$CSC_BROKER_URL" $(BENCHMARK_BASIC_FLAGS)'
160
+
cd mqttbs && go run ./cmd/mqttbs run basic-suite --broker "$(CSC_BROKER_URL)"$(BENCHMARK_BASIC_FLAGS)
160
161
161
162
benchmark-basic-full: check-e2e-env ## Run full MQTT benchmark basic suite
162
-
./infra/scripts/with-gateway-port-forwards.sh sh -c 'cd mqttbs && go run ./cmd/mqttbs run basic-suite --broker "$$CSC_BROKER_URL"'
163
+
cd mqttbs && go run ./cmd/mqttbs run basic-suite --broker "$(CSC_BROKER_URL)"
163
164
164
165
benchmark-performance: check-e2e-env ## Run full performance benchmarks
165
-
./infra/scripts/with-gateway-port-forwards.sh sh -c 'cd mqtt-client && go test -count=1 -v ./tests/performance/ -timeout 10m'
166
+
cd mqtt-client && go test -count=1 -v ./tests/performance/ -timeout 10m
Copy file name to clipboardExpand all lines: local/README.md
+18-4Lines changed: 18 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,9 +57,23 @@ make deploy-nats
57
57
58
58
### Run Tests
59
59
60
-
Performance and benchmark targets require MetalLB (installed by `make setup-infra`). Without it, `kubectl port-forward` is used as a fallback but cannot sustain benchmark throughput — tests fail silently with connectivity errors that do not indicate the root cause.
60
+
Performance and benchmark targets require MetalLB, installed by
61
+
`make setup-infra`, so local clients connect through the Envoy Gateway
62
+
LoadBalancer IPs. On macOS, keep `docker-mac-net-connect` running so the host can
63
+
reach those IPs. Linux hosts normally reach the Docker bridge IPs directly.
64
+
65
+
The default CSC broker endpoint is `tcp://172.18.200.1:1883`. Override
66
+
`CSC_BROKER_URL` only when testing a different reachable broker.
67
+
68
+
Full benchmark targets can saturate local hosts because they drive thousands of
69
+
MQTT clients through Kind, Envoy Gateway, NATS, and auth-callout. If a full run
70
+
fails with EOFs or success-rate misses, check host CPU and pod metrics before
71
+
treating it as a networking failure.
61
72
62
73
```bash
74
+
# Verify host access to the CSC Envoy Gateway after NATS is deployed
75
+
nc -vz 172.18.200.1 1883
76
+
63
77
# Run functional tests against all candidates
64
78
make test-functional
65
79
@@ -169,6 +183,6 @@ Run against the local Kind environment:
169
183
make dummy-bms
170
184
```
171
185
172
-
The dummy BMS target uses the same local e2e environment and gateway
173
-
port-forward setup as the functional and performance tests. It publishes to the
174
-
CSC broker URL exported by that wrapper.
186
+
The dummy BMS target uses the same local e2e environment and Envoy Gateway
187
+
LoadBalancer path as the functional and performance tests. It publishes to the
188
+
CSC broker at `tcp://172.18.200.1:1883` unless `CSC_BROKER_URL` is overridden.
# Optional: Deploy full observability stack (Prometheus + Grafana)
33
40
make setup-observability
34
41
```
@@ -171,12 +178,12 @@ Kubernetes Metrics Server provides resource metrics (CPU/memory) for nodes and p
171
178
kubectl top nodes --context kind-csc
172
179
173
180
# View pod metrics
174
-
kubectl top pods -n event-bus-nats --context kind-csc
181
+
kubectl top pods -n event-bus --context kind-csc
175
182
```
176
183
177
184
## Keycloak (OAuth2 Authentication)
178
185
179
-
Keycloak provides OAuth2/OpenID Connect authentication for testing the event bus auth callout service. A single Keycloak instance runs in the CSC cluster, and all clusters (CSC, CPC-1, CPC-2) access it via the external MetalLB LoadBalancer IP (172.18.200.1). Host-side tests use localhost port-forwarding because Docker-network LoadBalancer IPs are not reachable from every workstation environment.
186
+
Keycloak provides OAuth2/OpenID Connect authentication for testing the event bus auth callout service. A single Keycloak instance runs in the CSC cluster, and all clusters (CSC, CPC-1, CPC-2) access it via the external MetalLB LoadBalancer IP (172.18.200.1). Host-side local tests use the same Envoy Gateway path.
180
187
181
188
**Deployment:**
182
189
@@ -199,18 +206,11 @@ make setup-keycloak
199
206
200
207
**Access:**
201
208
202
-
Keycloak is exposed via Envoy Gateway HTTPRoute on port 80 at the CSC cluster's MetalLB LoadBalancer IP: `172.18.200.1`. All clusters access Keycloak at this address. From the host, prefer `make test-functional` or `make test-performance`; those targets port-forward Keycloak to `http://127.0.0.1:18080` automatically.
209
+
Keycloak is exposed via Envoy Gateway HTTPRoute on port 80 at the CSC cluster's MetalLB LoadBalancer IP: `172.18.200.1`. On macOS, keep `docker-mac-net-connect` running so the host can reach this address. Linux hosts normally reach the Docker bridge IPs directly.
0 commit comments