Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 67054c0

Browse files
authored
Merge pull request #96 from mnottale/e2e-renderer-check
e2e: Skip test if required renderer is not enabled.
2 parents 0c2230d + 8845b70 commit 67054c0

File tree

7 files changed

+9
-1
lines changed

7 files changed

+9
-1
lines changed

e2e/binary_test.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
var (
2424
dockerApp = ""
2525
hasExperimental = false
26+
renderers = ""
2627
)
2728

2829
func getBinary(t *testing.T) (string, bool) {
@@ -40,7 +41,10 @@ func getBinary(t *testing.T) (string, bool) {
4041
output, err := cmd.CombinedOutput()
4142
assert.NilError(t, err, "failed to execute %s", binName)
4243
dockerApp = binName
43-
hasExperimental = strings.Contains(string(output), "Experimental: on")
44+
sOutput := string(output)
45+
hasExperimental = strings.Contains(sOutput, "Experimental: on")
46+
i := strings.Index(sOutput, "Renderers")
47+
renderers = sOutput[i+10:]
4448
return dockerApp, hasExperimental
4549
}
4650

@@ -73,6 +77,10 @@ func TestRenderBinary(t *testing.T) {
7377
assert.NilError(t, err, "unable to get apps")
7478
for _, app := range apps {
7579
t.Log("testing", app.Name())
80+
if (strings.Contains(app.Name(), "gotemplate") && !strings.Contains(renderers, "gotemplate")) ||
81+
(strings.Contains(app.Name(), "yatee") && !strings.Contains(renderers, "yatee")) {
82+
t.Skip("Required renderer not enabled.")
83+
}
7684
settings, overrides, env := gather(t, filepath.Join("render", app.Name()))
7785
args := []string{
7886
"render",

0 commit comments

Comments
 (0)