CICD-326 · gRPC endpoint testing
Encyclopedia · Advanced networking and API testing · All snippets
Previous · CICD-325 · Next · CICD-327
1. Where it fits
- Placement CI run step or authorized lab terminal.
- Prerequisites authorized test service, known endpoint or local fixture and the named test CLI.
- Platforms local-linux, github-actions, gitea-actions.
- Parameters
GRPC_TARGET.
2. Copy the snippet
bash
grpcurl -d '{"service":""}' "${GRPC_TARGET:?}" grpc.health.v1.Health/Check | jq -e '.status == "SERVING"'3. How it works
The gRPC client invokes the specified method using reflection or a supplied descriptor and checks the response payload. The expression filters or transforms the input JSON. Where jq -e is used, a false or empty result can fail the gate.
4. Verify the result
Requires reflection or an explicit health proto. Use a trusted TLS certificate.
Validation syntax-validated (Bash parse). Status definitions.