This repository is designed to help me learn how testing works in Helm charts. It provides a simple example of end-to-end (E2E) testing for a Helm chart deployed to a local Kubernetes environment using Kind.
The Taskfile in this repository automates the following steps to test the Helm chart:
- Deletes the Kind cluster (if it exists).
- Creates a new Kind cluster.
- Deploys the Helm chart to the newly created Kind cluster.
- Runs end-to-end tests on the deployed Helm chart:
- One test will pass.
- One test will fail.
These tests are specifically designed to demonstrate how Helm tests are structured and executed in a Kubernetes environment.
To execute the task and run the end-to-end test, simply run the following command:
task e2e-testThis command will:
- Clean up any existing Kind cluster,
- Create a new Kind cluster,
- Deploy the Helm chart to the cluster,
- Run the tests, and
- Display the results (one test will pass, and one will fail).
Before running the tests, make sure you have the following tools installed:
The primary goal of this repository is to explore and learn about Helm chart testing, including how to:
- Write test hooks for Helm,
- Use
helm testto execute tests against deployed applications, and - Understand how Helm interacts with Kubernetes resources during testing.