Testing in a live cluster
Creating chart tests is an important part of developing and maintaining your Helm charts. Chart tests help verify that your chart is functioning as intended and they can help prevent regressions as features and fixes to your chart are added.
Testing consists of two different steps. First, you need to create pod
templates under your chart's templates/
directory that contain the helm.sh/hook: test
annotation. These pods
will run commands that test the functionality of your chart and application. Next, you need to run the helm test
command, which initiates a test
hook and creates resources with the aforementioned annotation.
In this section, we will learn how to test in a live cluster by adding tests to the Guestbook chart, continuing the development of the chart you created in the previous chapter. As a reference, the tests that you will create can be viewed in the Guestbook chart in the Packt repository, located at https://github.com/PacktPublishing...