An integration test checks that provisioned infrastructure or deployed services behave as intended through their real interfaces. For infrastructure code, the useful question is not whether a cloud API works: it is whether a reusable module creates the resources and configuration its maintainers promised. section 6.3.5
Choose checks that reflect the outcome the pipeline must deliver:
- For a reusable Terraform module, apply it in a dedicated cloud account or project and verify the resulting resources and configuration. section 6.3.5
- For an infrastructure change, write a failing check against an acceptance criterion, such as a required subnet-tag naming pattern; apply the code until it passes, then refactor. section 6.3.5
- For a control-plane service, deploy a pinned version with Helm, then check its health through the Kubernetes API. Repeat tests to catch manual changes outside the pipeline. section 8.3.1 section 6.5
Test a service after deployment
After deploying kube-state-metrics, check that its pod is Running, inspect its startup log, and query its metrics endpoint for expected output. These checks go beyond a successful Helm command: they confirm that the deployed service starts and reports data. section 8.3.1
@test "kube-state-metrics status is Running" {
run bash -c "kubectl get po -n kube-system -o wide | grep 'kube-state-metrics'"
[[ "${output}" =~ "Running" ]]
}
@test "kube-state-metrics logs show service has started successfully" {
run bash -c "kubectl logs deployment/kube-state-metrics
➥ -n kube-system -c kube-state-metrics"
[[ "${output}" =~ "Started kube-state-metrics self metrics server" ]]
}
The Bash test examples use kubectl to check a pod’s running status and the service’s startup log. section 8.3.1
Test platform behavior from the user’s side as well as the administrator’s: an EKS pipeline can deploy test applications that use platform features in a customer-like manner. Keep these checks in the delivery workflow so configuration errors and unintended changes surface before they undermine trust in the platform. section 7.5 section 6.5






























