---
id: w1/m23/t006
title: Test coverage — envtest for the ReadinessProbe from t001
worker: worker1
status: todo
estimate: 20m
depends_on: [w1/m23/t001]
---

## Objective

Add a meaningful test for the health-gating behavior t001 shipped: the reconciled Deployment carries a ReadinessProbe derived from `spec.healthCheckPath`. Assert real behavior, not a tautology. (If t001 dropped the field instead, assert no probe is set and the field is gone.)

## Context

- Operator envtest already exercises `reconcileKubernetes` → Deployment; extend it.

## Steps

1. Envtest: apply an `App` with a non-default `healthCheckPath`; assert the Deployment container's ReadinessProbe HTTP path matches.
2. Assert the default (`/`) case too.

## Files

- `lego/operator/internal/controller/…_test.go`

## Acceptance criteria

- [ ] Test fails if the probe path desyncs from `healthCheckPath` (or, in the drop path, if the field reappears).
- [ ] `make test` green.

## Out of scope

- Coverage for the other chores (t002 dep bumps, t003 script, t004 docs) — no meaningful unit under test.
