Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

Commit

Permalink
Turn arguments uniform
Browse files Browse the repository at this point in the history
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
  • Loading branch information
ulyssessouza committed Mar 7, 2019
1 parent f5ee4ef commit 4476ed9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions e2e/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,37 +62,37 @@ func TestMain(m *testing.M) {
}
configDir, err := ioutil.TempDir("", "config")
if err != nil {
panic(err.Error())
panic(err)
}
defer os.RemoveAll(configDir)

err = os.Setenv("DOCKER_CONFIG", configDir)
if err != nil {
panic(err.Error())
panic(err)
}
dockerCli = dockerCliCommand{path: dockerCliPath, config: configDir}

config := dockerConfigFile.ConfigFile{CLIPluginsExtraDirs: []string{configDir}}
configFile, err := os.Create(filepath.Join(configDir, "config.json"))
if err != nil {
panic(err.Error())
panic(err)
}
err = json.NewEncoder(configFile).Encode(config)
if err != nil {
panic(err.Error())
panic(err)
}
dockerAppExecName := "docker-app"
if runtime.GOOS == "windows" {
dockerAppExecName += ".exe"
}
if err := os.Symlink(dockerApp, filepath.Join(configDir, dockerAppExecName)); err != nil {
panic(err.Error())
panic(err)
}

cmd := exec.Command(dockerApp, "app", "version")
output, err := cmd.CombinedOutput()
if err != nil {
panic(err.Error())
panic(err)
}
hasExperimental = bytes.Contains(output, []byte("Experimental: on"))
i := strings.Index(string(output), "Renderers")
Expand Down

0 comments on commit 4476ed9

Please sign in to comment.