From cd248576ea1e4a85e7fbb9c1e2968e4819cbffd8 Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Thu, 8 Jul 2021 08:54:13 -0400 Subject: [PATCH] e2e: remove colorized output from docker-compose (#6670) --- test/e2e/runner/exec.go | 4 ++-- test/e2e/runner/main.go | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/test/e2e/runner/exec.go b/test/e2e/runner/exec.go index f790f7fc1..f2bc5163c 100644 --- a/test/e2e/runner/exec.go +++ b/test/e2e/runner/exec.go @@ -33,14 +33,14 @@ func execVerbose(args ...string) error { // execCompose runs a Docker Compose command for a testnet. func execCompose(dir string, args ...string) error { return exec(append( - []string{"docker-compose", "-f", filepath.Join(dir, "docker-compose.yml")}, + []string{"docker-compose", "--ansi=never", "-f", filepath.Join(dir, "docker-compose.yml")}, args...)...) } // execComposeVerbose runs a Docker Compose command for a testnet and displays its output. func execComposeVerbose(dir string, args ...string) error { return execVerbose(append( - []string{"docker-compose", "-f", filepath.Join(dir, "docker-compose.yml")}, + []string{"docker-compose", "--ansi=never", "-f", filepath.Join(dir, "docker-compose.yml")}, args...)...) } diff --git a/test/e2e/runner/main.go b/test/e2e/runner/main.go index acad7ccc7..5924fea0e 100644 --- a/test/e2e/runner/main.go +++ b/test/e2e/runner/main.go @@ -235,10 +235,7 @@ func NewCLI() *CLI { Example: "runner logs validator03", Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - if len(args) == 1 { - return execComposeVerbose(cli.testnet.Dir, "logs", args[0]) - } - return execComposeVerbose(cli.testnet.Dir, "logs") + return execComposeVerbose(cli.testnet.Dir, append([]string{"logs", "--no-color"}, args...)...) }, })