Skip to content

josephaw1022/learning-helm-chart-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learning Helm Testing

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.

Task Overview

The Taskfile in this repository automates the following steps to test the Helm chart:

  1. Deletes the Kind cluster (if it exists).
  2. Creates a new Kind cluster.
  3. Deploys the Helm chart to the newly created Kind cluster.
  4. 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.

Running the Test

To execute the task and run the end-to-end test, simply run the following command:

task e2e-test

This 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).

Prerequisites

Before running the tests, make sure you have the following tools installed:

  • Kind (for creating a local Kubernetes cluster)
  • Task CLI (for running tasks)

Purpose of the Repository

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 test to execute tests against deployed applications, and
  • Understand how Helm interacts with Kubernetes resources during testing.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages