Loading .gitlab/ci/chart.gitlab-ci.yml +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ chart:test: variables: GO_VERSION: "1.18.6" script: - apk add build-base - apk add build-base yamllint - wget https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz - tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz - export PATH=$PATH:/usr/local/go/bin Loading assets/auto-deploy-app/test/templates/cronjob_test.go +1 −8 Original line number Diff line number Diff line Loading @@ -84,14 +84,7 @@ func TestCronjobMeta(t *testing.T) { KubectlOptions: k8s.NewKubectlOptions("", "", namespaceName), } output, err := helm.RenderTemplateE(t, options, helmChartPath, tc.Release, []string{"templates/cronjob.yaml"}) if err != nil { t.Error(err) return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") output := renderTemplate(t, options, tc.Release, []string{"templates/cronjob.yaml"}, nil) var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) Loading assets/auto-deploy-app/test/templates/hpa_test.go +3 −4 Original line number Diff line number Diff line Loading @@ -69,11 +69,10 @@ func TestHPA_AutoscalingV1(t *testing.T) { for _, tc := range tcs { t.Run(tc.name, func(t *testing.T) { output, ret := renderTemplate(t, tc.values, releaseName, templates, tc.expectedErrorRegexp) if ret == false { return opts := &helm.Options{ SetValues: tc.values, } output := renderTemplate(t, opts, releaseName, templates, tc.expectedErrorRegexp) hpa := new(autoscalingV1.HorizontalPodAutoscaler) helm.UnmarshalK8SYaml(t, output, hpa) Loading assets/auto-deploy-app/test/templates/ingress_test.go +6 −8 Original line number Diff line number Diff line Loading @@ -112,11 +112,10 @@ func TestIngressTemplate_DifferentTracks(t *testing.T) { for _, tc := range tcs { t.Run(tc.name, func(t *testing.T) { output, ret := renderTemplate(t, tc.values, tc.releaseName, templates, tc.expectedErrorRegexp) if ret == false { return opts := &helm.Options{ SetValues: tc.values, } output := renderTemplate(t, opts, tc.releaseName, templates, tc.expectedErrorRegexp) ingress := new(extensions.Ingress) helm.UnmarshalK8SYaml(t, output, ingress) Loading Loading @@ -162,11 +161,10 @@ func TestIngressTemplate_TLS(t *testing.T) { for _, tc := range tcs { t.Run(tc.name, func(t *testing.T) { output, ret := renderTemplate(t, tc.values, releaseName, templates, tc.expectedErrorRegexp) if ret == false { return opts := &helm.Options{ SetValues: tc.values, } output := renderTemplate(t, opts, releaseName, templates, tc.expectedErrorRegexp) ingress := new(extensions.Ingress) helm.UnmarshalK8SYaml(t, output, ingress) Loading assets/auto-deploy-app/test/templates/pvc_test.go +6 −8 Original line number Diff line number Diff line Loading @@ -71,11 +71,10 @@ func TestPvcTemplate_Single(t *testing.T) { for _, tc := range tcs { t.Run(tc.name, func(t *testing.T) { output, ret := renderTemplate(t, tc.values, releaseName, templates, tc.expectedErrorRegexp) if ret == false { return opts := &helm.Options{ SetValues: tc.values, } output := renderTemplate(t, opts, releaseName, templates, tc.expectedErrorRegexp) pvc := new(coreV1.PersistentVolumeClaim) helm.UnmarshalK8SYaml(t, output, pvc) Loading Loading @@ -146,11 +145,10 @@ func TestPvcTemplate_Multiple(t *testing.T) { for _, tc := range tcs { t.Run(tc.name, func(t *testing.T) { output, ret := renderTemplate(t, tc.values, releaseName, templates, tc.expectedErrorRegexp) if ret == false { return opts := &helm.Options{ SetValues: tc.values, } output := renderTemplate(t, opts, releaseName, templates, tc.expectedErrorRegexp) pvcList := strings.Split(output, "---") for i, pvcOutput := range pvcList[1:] { Loading Loading
.gitlab/ci/chart.gitlab-ci.yml +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ chart:test: variables: GO_VERSION: "1.18.6" script: - apk add build-base - apk add build-base yamllint - wget https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz - tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz - export PATH=$PATH:/usr/local/go/bin Loading
assets/auto-deploy-app/test/templates/cronjob_test.go +1 −8 Original line number Diff line number Diff line Loading @@ -84,14 +84,7 @@ func TestCronjobMeta(t *testing.T) { KubectlOptions: k8s.NewKubectlOptions("", "", namespaceName), } output, err := helm.RenderTemplateE(t, options, helmChartPath, tc.Release, []string{"templates/cronjob.yaml"}) if err != nil { t.Error(err) return } require.NotRegexp(t, regexp.MustCompile("\n[[:space:]]*\n"), output, "found empty lines in output") output := renderTemplate(t, options, tc.Release, []string{"templates/cronjob.yaml"}, nil) var cronjobs batchV1beta1.CronJobList helm.UnmarshalK8SYaml(t, output, &cronjobs) Loading
assets/auto-deploy-app/test/templates/hpa_test.go +3 −4 Original line number Diff line number Diff line Loading @@ -69,11 +69,10 @@ func TestHPA_AutoscalingV1(t *testing.T) { for _, tc := range tcs { t.Run(tc.name, func(t *testing.T) { output, ret := renderTemplate(t, tc.values, releaseName, templates, tc.expectedErrorRegexp) if ret == false { return opts := &helm.Options{ SetValues: tc.values, } output := renderTemplate(t, opts, releaseName, templates, tc.expectedErrorRegexp) hpa := new(autoscalingV1.HorizontalPodAutoscaler) helm.UnmarshalK8SYaml(t, output, hpa) Loading
assets/auto-deploy-app/test/templates/ingress_test.go +6 −8 Original line number Diff line number Diff line Loading @@ -112,11 +112,10 @@ func TestIngressTemplate_DifferentTracks(t *testing.T) { for _, tc := range tcs { t.Run(tc.name, func(t *testing.T) { output, ret := renderTemplate(t, tc.values, tc.releaseName, templates, tc.expectedErrorRegexp) if ret == false { return opts := &helm.Options{ SetValues: tc.values, } output := renderTemplate(t, opts, tc.releaseName, templates, tc.expectedErrorRegexp) ingress := new(extensions.Ingress) helm.UnmarshalK8SYaml(t, output, ingress) Loading Loading @@ -162,11 +161,10 @@ func TestIngressTemplate_TLS(t *testing.T) { for _, tc := range tcs { t.Run(tc.name, func(t *testing.T) { output, ret := renderTemplate(t, tc.values, releaseName, templates, tc.expectedErrorRegexp) if ret == false { return opts := &helm.Options{ SetValues: tc.values, } output := renderTemplate(t, opts, releaseName, templates, tc.expectedErrorRegexp) ingress := new(extensions.Ingress) helm.UnmarshalK8SYaml(t, output, ingress) Loading
assets/auto-deploy-app/test/templates/pvc_test.go +6 −8 Original line number Diff line number Diff line Loading @@ -71,11 +71,10 @@ func TestPvcTemplate_Single(t *testing.T) { for _, tc := range tcs { t.Run(tc.name, func(t *testing.T) { output, ret := renderTemplate(t, tc.values, releaseName, templates, tc.expectedErrorRegexp) if ret == false { return opts := &helm.Options{ SetValues: tc.values, } output := renderTemplate(t, opts, releaseName, templates, tc.expectedErrorRegexp) pvc := new(coreV1.PersistentVolumeClaim) helm.UnmarshalK8SYaml(t, output, pvc) Loading Loading @@ -146,11 +145,10 @@ func TestPvcTemplate_Multiple(t *testing.T) { for _, tc := range tcs { t.Run(tc.name, func(t *testing.T) { output, ret := renderTemplate(t, tc.values, releaseName, templates, tc.expectedErrorRegexp) if ret == false { return opts := &helm.Options{ SetValues: tc.values, } output := renderTemplate(t, opts, releaseName, templates, tc.expectedErrorRegexp) pvcList := strings.Split(output, "---") for i, pvcOutput := range pvcList[1:] { Loading