mirror of
https://github.com/helm/chart-testing.git
synced 2026-02-05 09:45:14 +01:00
* upgrade to go1.19 Signed-off-by: cpanato <ctadeu@gmail.com> * add golangci-lint Signed-off-by: cpanato <ctadeu@gmail.com> * fix lints and Replace github.com/pkg/errors dependency with native error wrapping Signed-off-by: cpanato <ctadeu@gmail.com> * update install kind cluster Signed-off-by: cpanato <ctadeu@gmail.com> * update tests Signed-off-by: cpanato <ctadeu@gmail.com> * use errors.new Signed-off-by: cpanato <ctadeu@gmail.com> Signed-off-by: cpanato <ctadeu@gmail.com>
44 lines
643 B
Bash
Executable File
44 lines
643 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -o errexit
|
|
set -o nounset
|
|
set -o pipefail
|
|
|
|
CLUSTER_NAME=chart-testing
|
|
readonly CLUSTER_NAME
|
|
|
|
K8S_VERSION=v1.22.9
|
|
readonly K8S_VERSION
|
|
|
|
create_kind_cluster() {
|
|
kind create cluster --name "$CLUSTER_NAME" --image "kindest/node:$K8S_VERSION" --wait 60s
|
|
|
|
kubectl cluster-info || kubectl cluster-info dump
|
|
echo
|
|
|
|
kubectl get nodes
|
|
echo
|
|
|
|
echo 'Cluster ready!'
|
|
echo
|
|
}
|
|
|
|
test_e2e() {
|
|
go test -cover -race -tags=integration ./...
|
|
echo
|
|
}
|
|
|
|
cleanup() {
|
|
kind delete cluster --name "$CLUSTER_NAME"
|
|
echo 'Done!'
|
|
}
|
|
|
|
main() {
|
|
trap cleanup EXIT
|
|
|
|
create_kind_cluster
|
|
test_e2e
|
|
}
|
|
|
|
main
|