Introduce Helmfile's own filesystem abstraction to correctly unit test some components (#307)

Use abstracted FS

Signed-off-by: Arkaitz Jimenez <arkaitzj@gmail.com>

Signed-off-by: Arkaitz Jimenez <arkaitzj@gmail.com>
This commit is contained in:
Arkaitz Jimenez
2022-08-24 12:58:43 +09:00
committed by GitHub
parent a626664f46
commit cc33e7b7d8
44 changed files with 513 additions and 425 deletions
+2 -3
View File
@@ -4,7 +4,6 @@ import (
"bufio"
"bytes"
"io"
"path/filepath"
"sync"
"testing"
@@ -13,6 +12,7 @@ import (
"go.uber.org/zap"
"github.com/helmfile/helmfile/pkg/exectest"
ffs "github.com/helmfile/helmfile/pkg/filesystem"
"github.com/helmfile/helmfile/pkg/helmexec"
"github.com/helmfile/helmfile/pkg/testhelper"
)
@@ -1352,8 +1352,7 @@ changing working directory back to "/path/to"
app := appWithFs(&App{
OverrideHelmBinary: DefaultHelmBinary,
glob: filepath.Glob,
abs: filepath.Abs,
fs: ffs.DefaultFileSystem(),
OverrideKubeContext: overrideKubeContext,
Env: "default",
Logger: logger,