Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arybolovlev committed Nov 18, 2024
1 parent 44bc042 commit 264154e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/unit/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func renderServiceAccountManifest(t *testing.T, options *helm.Options) corev1.Se
output, err := helm.RenderTemplateE(t, options, helmChartPath, helmReleaseName, []string{serviceAccountTemplate})
assert.NoError(t, err)

var sa corev1.ServiceAccount
sa := corev1.ServiceAccount{}
helm.UnmarshalK8SYaml(t, output, &sa)
return sa
}
3 changes: 1 addition & 2 deletions charts/unit/service_account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestControllerServiceAccountCreateFalse(t *testing.T) {
Version: helmChartVersion,
}

_, err := helm.RenderTemplateE(t, options, helmChartPath, helmReleaseName, []string{"templates/serviceaccount.yaml"})
_, err := helm.RenderTemplateE(t, options, helmChartPath, helmReleaseName, []string{serviceAccountTemplate})
assert.Error(t, err)
assert.Contains(t, err.Error(), fmt.Sprintf("could not find template %s in chart", serviceAccountTemplate))
}
Expand All @@ -60,7 +60,6 @@ func TestControllerServiceAccountAnnotations(t *testing.T) {
assert.Equal(t, defaultNamespace, sa.Namespace)
}

// FINISH
func TestControllerServiceAccountNamespace(t *testing.T) {
ns := "this"
options := &helm.Options{
Expand Down

0 comments on commit 264154e

Please sign in to comment.