mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-21 12:15:12 +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:
@@ -1,13 +1,11 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
"github.com/helmfile/helmfile/pkg/helmexec"
|
||||
"github.com/helmfile/helmfile/pkg/remote"
|
||||
"github.com/helmfile/helmfile/pkg/state"
|
||||
"github.com/helmfile/helmfile/pkg/testhelper"
|
||||
@@ -16,12 +14,12 @@ import (
|
||||
// nolint: unparam
|
||||
func makeLoader(files map[string]string, env string) (*desiredStateLoader, *testhelper.TestFs) {
|
||||
testfs := testhelper.NewTestFs(files)
|
||||
logger := helmexec.NewLogger(os.Stdout, "debug")
|
||||
logger := newAppTestLogger()
|
||||
r := remote.NewRemote(logger, testfs.Cwd, testfs.ToFileSystem())
|
||||
return &desiredStateLoader{
|
||||
env: env,
|
||||
namespace: "namespace",
|
||||
logger: helmexec.NewLogger(os.Stdout, "debug"),
|
||||
logger: newAppTestLogger(),
|
||||
fs: testfs.ToFileSystem(),
|
||||
remote: r,
|
||||
}, testfs
|
||||
|
||||
Reference in New Issue
Block a user