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

Commit d502caa

Browse files
committed
Small follow-ups fixes for readability
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 556c6eb commit d502caa

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

e2e/commands_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,18 @@ func TestRender(t *testing.T) {
5858

5959
func testRenderApp(appPath string, env ...string) func(*testing.T) {
6060
return func(t *testing.T) {
61-
envs := map[string]string{}
61+
envSettings := map[string]string{}
6262
data, err := ioutil.ReadFile(filepath.Join(appPath, "env.yml"))
6363
assert.NilError(t, err)
64-
assert.NilError(t, yaml.Unmarshal(data, &envs))
65-
args := []string{"render", filepath.Join(appPath, "my.dockerapp"),
64+
assert.NilError(t, yaml.Unmarshal(data, &envSettings))
65+
args := []string{dockerApp, "render", filepath.Join(appPath, "my.dockerapp"),
6666
"-f", filepath.Join(appPath, "settings-0.yml"),
6767
}
68-
for k, v := range envs {
68+
for k, v := range envSettings {
6969
args = append(args, "-s", fmt.Sprintf("%s=%s", k, v))
7070
}
7171
result := icmd.RunCmd(icmd.Cmd{
72-
Command: append([]string{dockerApp}, args...),
72+
Command: args,
7373
Env: env,
7474
}).Assert(t, icmd.Success)
7575
assert.Assert(t, is.Equal(readFile(t, filepath.Join(appPath, "expected.txt")), result.Stdout()), "rendering missmatch")

e2e/main_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package e2e
22

33
import (
4+
"bytes"
45
"flag"
56
"os"
67
"os/exec"
@@ -37,7 +38,7 @@ func TestMain(m *testing.M) {
3738
if err != nil {
3839
panic(err)
3940
}
40-
hasExperimental = strings.Contains(string(output), "Experimental: on")
41+
hasExperimental = bytes.Contains(output, []byte("Experimental: on"))
4142
i := strings.Index(string(output), "Renderers")
4243
renderers = string(output)[i+10:]
4344
os.Exit(m.Run())

0 commit comments

Comments
 (0)