Browse Source

chore: fix smells

Signed-off-by: Moritz Johner <beller.moritz@googlemail.com>
Moritz Johner 4 years ago
parent
commit
a627e82639
2 changed files with 7 additions and 7 deletions
  1. 6 6
      e2e/suite/template/template.go
  2. 1 1
      pkg/template/v2/template_test.go

+ 6 - 6
e2e/suite/template/template.go

@@ -37,13 +37,13 @@ func useTemplateV1(tc *framework.TestCase) {
 	tc.ExternalSecret.Spec.Target.Template = &esv1alpha1.ExternalSecretTemplate{
 		EngineVersion: esv1alpha1.TemplateEngineV1,
 		Data: map[string]string{
-			"my-data": "executed: {{ .singlefoo | toString }}|{{ .singlebaz | toString }}",
-			"other":   `{{ .foo | toString }}|{{ .bar | toString }}`,
+			"tplv1": "executed: {{ .singlefoo | toString }}|{{ .singlebaz | toString }}",
+			"other": `{{ .foo | toString }}|{{ .bar | toString }}`,
 		},
 	}
 	tc.ExpectedSecret.Data = map[string][]byte{
-		"my-data": []byte(`executed: bar|bang`),
-		"other":   []byte(`barmap|bangmap`),
+		"tplv1": []byte(`executed: bar|bang`),
+		"other": []byte(`barmap|bangmap`),
 	}
 }
 
@@ -52,14 +52,14 @@ func useTemplateV2(tc *framework.TestCase) {
 	tc.ExternalSecret.Spec.Target.Template = &esv1alpha1.ExternalSecretTemplate{
 		EngineVersion: esv1alpha1.TemplateEngineV2,
 		Data: map[string]string{
-			"my-data":   "executed: {{ .singlefoo }}|{{ .singlebaz }}",
+			"tplv2":     "executed: {{ .singlefoo }}|{{ .singlebaz }}",
 			"other":     `{{ .foo }}|{{ .bar }}`,
 			"sprig-str": `{{ .foo | upper }}`,
 			"json-ex":   `{{ $var := .singlejson | fromJson }}{{ $var.foo | toJson }}`,
 		},
 	}
 	tc.ExpectedSecret.Data = map[string][]byte{
-		"my-data":   []byte(`executed: bar|bang`),
+		"tplv2":     []byte(`executed: bar|bang`),
 		"other":     []byte(`barmap|bangmap`),
 		"sprig-str": []byte(`BARMAP`),
 		"json-ex":   []byte(`{"bar":"baz"}`),

+ 1 - 1
pkg/template/v2/template_test.go

@@ -185,7 +185,7 @@ func TestExecute(t *testing.T) {
 		{
 			name: "use sprig functions",
 			tpl: map[string][]byte{
-				"foo": []byte(`{{ .path | ext }}`), // TODO: this is a breaking change
+				"foo": []byte(`{{ .path | ext }}`),
 			},
 			data: map[string][]byte{
 				"path": []byte(`foo/bar/baz.exe`),