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

Commit 0d7c51e

Browse files
committed
Remove renderers
Signed-off-by: Djordje Lukic <[email protected]>
1 parent 4e71bce commit 0d7c51e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+6
-2977
lines changed

Gopkg.lock

Lines changed: 1 addition & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e/commands_test.go

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,8 @@ import (
1919
"gotest.tools/fs"
2020
"gotest.tools/golden"
2121
"gotest.tools/icmd"
22-
"gotest.tools/skip"
2322
)
2423

25-
// Skipping experimental e2e test on rendering with templates, as it needs now to set
26-
// the DOCKERAPP_RENDERERS environment variable inside the invocation image,
27-
// and the only way to do it is to add a new parameter to the bundle.json.
28-
// This test should be unskipped or removed as soon as the templates are
29-
// not experimental anymore, or are removed.
30-
func TestRenderTemplates(t *testing.T) {
31-
t.Skip("renderer templates tests")
32-
skip.If(t, !hasExperimental, "experimental mode needed for this test")
33-
appsPath := filepath.Join("testdata", "templates")
34-
apps, err := ioutil.ReadDir(appsPath)
35-
assert.NilError(t, err, "unable to get apps")
36-
for _, app := range apps {
37-
appPath := filepath.Join(appsPath, app.Name())
38-
if !checkRenderers(app.Name(), renderers) {
39-
t.Log("Required renderer not enabled")
40-
continue
41-
}
42-
t.Run(app.Name(), testRenderApp(appPath, "DOCKERAPP_RENDERERS="+app.Name()))
43-
}
44-
}
45-
4624
func TestRender(t *testing.T) {
4725
appsPath := filepath.Join("testdata", "render")
4826
apps, err := ioutil.ReadDir(appsPath)

e2e/helper_test.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,6 @@ func readFile(t *testing.T, path string) string {
2121
return strings.Replace(string(content), "\r", "", -1)
2222
}
2323

24-
// checkRenderers returns false if appname requires a renderer that is not in enabled
25-
func checkRenderers(appname string, enabled string) bool {
26-
renderers := []string{"gotemplate", "yatee", "mustache"}
27-
for _, r := range renderers {
28-
if strings.Contains(appname, r) && !strings.Contains(enabled, r) {
29-
return false
30-
}
31-
}
32-
return true
33-
}
34-
3524
// Container represents a docker container
3625
type Container struct {
3726
image string

e2e/main_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"os/exec"
1010
"path/filepath"
1111
"runtime"
12-
"strings"
1312
"testing"
1413

1514
"github.com/deislabs/cnab-go/credentials"
@@ -23,7 +22,6 @@ var (
2322
e2ePath = flag.String("e2e-path", ".", "Set path to the e2e directory")
2423
dockerCliPath = os.Getenv("DOCKERCLI_BINARY")
2524
hasExperimental = false
26-
renderers = ""
2725
dockerCli dockerCliCommand
2826
)
2927

@@ -128,8 +126,6 @@ func TestMain(m *testing.M) {
128126
panic(err)
129127
}
130128
hasExperimental = bytes.Contains(output, []byte("Experimental: on"))
131-
i := strings.Index(string(output), "Renderers")
132-
renderers = string(output)[i+10:]
133129
os.Exit(m.Run())
134130
}
135131

e2e/testdata/templates/gotemplate/env.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

e2e/testdata/templates/gotemplate/expected.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.

e2e/testdata/templates/gotemplate/my.dockerapp/docker-compose.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

e2e/testdata/templates/gotemplate/my.dockerapp/metadata.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

e2e/testdata/templates/gotemplate/my.dockerapp/parameters.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

e2e/testdata/templates/gotemplate/parameters-0.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)