Keep your Helm charts afloat with comprehensive testing
Go to file
rancher-security-bot b0c4da138d Replace 3rd party action with native CLI 2023-07-12 08:56:35 +00:00
.github Replace 3rd party action with native CLI 2023-07-12 08:56:35 +00:00
docs changed github.com/aiyengar2/hull to github.com/rancher/hull 2023-03-28 14:44:30 +05:30
examples changed github.com/aiyengar2/hull to github.com/rancher/hull 2023-03-28 14:44:30 +05:30
pkg skip parsing manifests of non yaml files 2023-03-31 20:56:22 +05:30
scripts
testdata Add ability to supply FailureCases 2023-03-08 17:37:29 -08:00
.dockerignore
.gitignore
.golangci.json
CODEOWNERS Adding eliyamlevy to CODEOWNERS 2023-04-06 12:12:13 -04:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md changed github.com/aiyengar2/hull to github.com/rancher/hull 2023-03-28 14:44:30 +05:30
Dockerfile.dapper changed github.com/aiyengar2/hull to github.com/rancher/hull 2023-03-28 14:44:30 +05:30
LICENSE
MAINTAINERS.md
Makefile
README.md Update README.md 2023-03-24 08:13:12 -07:00
SECURITY.md
go.mod changed github.com/aiyengar2/hull to github.com/rancher/hull 2023-03-28 14:44:30 +05:30
go.sum Bump Helm version and add Set with interface{} value 2023-03-02 12:26:46 -08:00
go.work
go.work.sum Bump Helm version and add Set with interface{} value 2023-03-02 12:26:46 -08:00

README.md

hull

License

Hull is a Go testing framework for writing comprehensive tests on Helm charts.

Once you have defined your suite of tests targeting a specific chart (or multiple charts) using Hull, you can simply run your suite(s) of tests by running go test.

Who needs Hull?

Anyone who maintains a Helm repository or a set of Helm charts that would like to add an automated testing suite that allows them to lint charts and setup unit tests.

For more information on why you might want to use Hull, see the About guide.

Prerequisites

You will be expected to install the following dependencies locally on your machine to successfully run Hull:

  • Go (minimal requirement to be able to run go test)
  • Yamllint (only required if you use Hull to run YAML linting on manifests produced by helm template commands)

Getting Started

Please see examples/example_test.go for an example of a Go test written for a single chart in this fashion on the chart located in testdata/charts/example-chart. To run the example test, you can simply run:

go test examples/example_test.go

Under the hood, Hull leverages github.com/stretchr/testify/assert for test assertions; it is recommended, but not required, for users to also use this framework when designing Hull tests.

Developing

Which branch do I make changes on?

Hull is built and released off the contents of the main branch. To make a contribution, open up a PR to the main branch.

For more information, see the Developing guide.

Building

make

Running

./bin/hull

License

Copyright (c) 2022 Rancher Labs, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.