From 8e44596171e4473820450aa177dc564d6b7de350 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Mon, 14 Nov 2022 09:56:54 +0100 Subject: [PATCH] less verbose command output Signed-off-by: Kristoffer Dalby --- integration/hsic/hsic.go | 10 ++++------ integration/tsic/tsic.go | 2 -- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/integration/hsic/hsic.go b/integration/hsic/hsic.go index 846813d7..8feac47e 100644 --- a/integration/hsic/hsic.go +++ b/integration/hsic/hsic.go @@ -203,8 +203,6 @@ func (t *HeadscaleInContainer) Shutdown() error { func (t *HeadscaleInContainer) Execute( command []string, ) (string, error) { - log.Println("command", command) - log.Printf("running command for %s\n", t.hostname) stdout, stderr, err := dockertestutil.ExecuteCommand( t.container, command, @@ -213,11 +211,11 @@ func (t *HeadscaleInContainer) Execute( if err != nil { log.Printf("command stderr: %s\n", stderr) - return "", err - } + if stdout != "" { + log.Printf("command stdout: %s\n", stdout) + } - if stdout != "" { - log.Printf("command stdout: %s\n", stdout) + return "", err } return stdout, nil diff --git a/integration/tsic/tsic.go b/integration/tsic/tsic.go index 16e6868f..d79f7ba6 100644 --- a/integration/tsic/tsic.go +++ b/integration/tsic/tsic.go @@ -179,8 +179,6 @@ func (t *TailscaleInContainer) Version() string { func (t *TailscaleInContainer) Execute( command []string, ) (string, string, error) { - log.Println("command", command) - log.Printf("running command for %s\n", t.hostname) stdout, stderr, err := dockertestutil.ExecuteCommand( t.container, command,