Skip to content

Add Helm chart unit tests for Deployment and MySQL StatefulSet#164

Open
devin-ai-integration[bot] wants to merge 1 commit intoDevOpsfrom
devin/1776789179-helm-unittest
Open

Add Helm chart unit tests for Deployment and MySQL StatefulSet#164
devin-ai-integration[bot] wants to merge 1 commit intoDevOpsfrom
devin/1776789179-helm-unittest

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot commented Apr 21, 2026

Summary

Adds helm-unittest coverage for the two core templates in helm/bankapp/ and cleans up Chart.yaml.

Chart.yaml — replaced boilerplate scaffold with a concise, project-specific definition (updated description, changed appVersion from "1.16.0""1.0.0").

Tests (41 tests, 2 suites — all passing locally):

  • tests/deployment_test.yaml — metadata/namespace, labels, replicas, init container (wait-for-mysql / busybox:1.28), app container image & port, env var sources (configMapKeyRef / secretKeyRef), liveness & readiness probes, resource requests/limits, and custom value overrides (image, resources, name, namespace).
  • tests/mysql_statefulset_test.yaml — metadata/namespace, serviceName, labels, replicas, container image & port, env var sources, volume mount, liveness & readiness probes (exec mysqladmin ping), volumeClaimTemplate (name, accessMode, storage), and custom value overrides (name, storage).

README — added a "Testing" section with plugin install and run commands.

Review & Testing Checklist for Human

  • Verify appVersion change is safe: appVersion was changed from "1.16.0" to "1.0.0". Confirm no template in helm/bankapp/templates/ references .Chart.AppVersion (e.g., for image tags or annotations) — if one does, this change could alter rendered manifests.
  • SPRING_DATASOURCE_PASSWORD uses hardcoded secret name: The deployment template hardcodes name: mysql-secret for the secretKeyRef rather than using {{ .Values.secret.name }}. The test correctly mirrors this, but it's a pre-existing inconsistency worth being aware of.
  • Run helm unittest helm/bankapp/ locally to confirm all 41 tests pass in your environment.

Notes

  • Tests use the helm-unittest plugin (helm plugin install https://github.com/helm-unittest/helm-unittest).
  • No CI job currently runs these tests automatically — consider adding a workflow step if desired.

Link to Devin session: https://app.devin.ai/sessions/e46575a271ab46e7b58b5b5db0e71dd4
Requested by: @ShawnAzman


Open in Devin Review

- Update Chart.yaml with correct description and appVersion
- Add deployment_test.yaml covering metadata, labels, replicas, init container,
  app container image/port, env vars, probes, resources, and custom overrides
- Add mysql_statefulset_test.yaml covering metadata, serviceName, labels,
  container image/port, env vars, volume mount, probes, VCT, and custom overrides
- Add Testing section to helm/README.md with plugin install and run instructions

Co-Authored-By: Shawn Azman <shawn.d.azman@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown
Author

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant