test(controller): cover image-change triggering a Deployment update #44

Merged
rcsheets merged 1 commit from test/reconcile-image-change into main 2026-07-01 11:05:53 +00:00
Owner

Summary

  • Adds TestReconcileKubernetes_ImageChangeUpdatesDeployment, which seeds a fake client with a Deployment built from an old spec.backend.kubernetes.image, reconciles a pool pointing at a new image, and asserts the stored Deployment's containers now reference the new image (and not the old).
  • Confirmed the test catches a regression: temporarily disabling the diff/update branch in reconcileKubernetes made it fail as expected.

Test plan

  • go build ./...
  • go test ./...
  • go vet ./... / gofmt -l
## Summary - Adds TestReconcileKubernetes_ImageChangeUpdatesDeployment, which seeds a fake client with a Deployment built from an old spec.backend.kubernetes.image, reconciles a pool pointing at a new image, and asserts the stored Deployment's containers now reference the new image (and not the old). - Confirmed the test catches a regression: temporarily disabling the diff/update branch in reconcileKubernetes made it fail as expected. ## Test plan - go build ./... - go test ./... - go vet ./... / gofmt -l
test(controller): cover image-change triggering a Deployment update
All checks were successful
CI (next Go) / next-go (tip) (pull_request) Successful in 4m28s
CI / ci (pull_request) Successful in 2m3s
E2E smoke test / e2e (pull_request) Successful in 3m21s
f8ab4fbc9f
Nothing exercised the reconcileKubernetes diff/update path before: seed a
fake client with a Deployment built from an old spec.backend.kubernetes.image,
reconcile against a pool with a new one, and assert the stored Deployment
picks up the new image (and drops the old). Verified the test actually
catches a regression by temporarily disabling the diff branch.
Collaborator

Automated review by pr-reviewer v0.31.0 | Safety Check | Mistral Small | tracking id r-44f227-d955c8
This is an AI-generated review and may contain mistakes.

Status: ⚠️ Unavailable


Review unavailable — the inference service isn't reachable right now. This isn't a problem with your PR. Tracking id r-44f227-d955c8.

Comment @pr-reviewer-bot retry once it's back.

*Automated review by [pr-reviewer](https://git.brooktrails.org/brooktrails/pr-reviewer) v0.31.0 | Safety Check | Mistral Small | tracking id `r-44f227-d955c8`* *This is an AI-generated review and may contain mistakes.* **Status:** ⚠️ Unavailable --- Review unavailable — the inference service isn't reachable right now. This isn't a problem with your PR. Tracking id `r-44f227-d955c8`. Comment `@pr-reviewer-bot retry` once it's back.
rcsheets deleted branch test/reconcile-image-change 2026-07-01 11:05:53 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
brooktrails/forgejo-runner-operator!44
No description provided.