mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-21 09:12:13 +02:00
Prevent excessive log in tests
I had been unhappy with the fact that our go-test output had a lot of debug log messages which obfuscated test results. I'm finally removeing all those by directing the test log output to io.Discard. Signed-off-by: Yusuke Kuoka <ykuoka@gmail.com>
This commit is contained in:
@@ -2,7 +2,7 @@ package state
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"io"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
@@ -73,7 +73,7 @@ func TestStorage_resolveFile(t *testing.T) {
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
st := NewStorage(cacheDir, helmexec.NewLogger(os.Stderr, "debug"), filesystem.DefaultFileSystem())
|
||||
st := NewStorage(cacheDir, helmexec.NewLogger(io.Discard, "debug"), filesystem.DefaultFileSystem())
|
||||
|
||||
files, skipped, err := st.resolveFile(tt.args.missingFileHandler, tt.args.title, tt.args.path)
|
||||
if (err != nil) != tt.wantErr {
|
||||
|
||||
Reference in New Issue
Block a user