mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-15 10:15:33 -04:00
Wrote and applied helper function for tests
replaced with new function removed log/slog readded log/slog when needed fixed last testwriter problems
This commit is contained in:
parent
944bdedc59
commit
76ada50c17
55 changed files with 133 additions and 178 deletions
|
@ -12,7 +12,6 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"log/slog"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
|
@ -197,7 +196,7 @@ func TestBackupHelmCharts(t *testing.T) {
|
|||
applier: &stubConstellApplier{
|
||||
stubKubernetesUpgrader: tc.backupClient,
|
||||
},
|
||||
log: slog.New(slog.NewTextHandler(logger.TestWriter{T: t}, nil)),
|
||||
log: logger.NewTest(t),
|
||||
}
|
||||
|
||||
err := a.backupHelmCharts(context.Background(), tc.helmApplier, tc.includesUpgrades, "")
|
||||
|
@ -443,7 +442,7 @@ func TestValidateInputs(t *testing.T) {
|
|||
cmd.SetIn(bytes.NewBufferString(tc.stdin))
|
||||
|
||||
a := applyCmd{
|
||||
log: slog.New(slog.NewTextHandler(logger.TestWriter{T: t}, nil)),
|
||||
log: logger.NewTest(t),
|
||||
fileHandler: fileHandler,
|
||||
flags: tc.flags,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue