mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-14 17:55:34 -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
|
@ -8,7 +8,6 @@ package cmd
|
|||
|
||||
import (
|
||||
"context"
|
||||
"log/slog"
|
||||
"testing"
|
||||
|
||||
"github.com/edgelesssys/constellation/v2/internal/logger"
|
||||
|
@ -39,7 +38,7 @@ func TestMAAPatch(t *testing.T) {
|
|||
t.Run(name, func(t *testing.T) {
|
||||
require := require.New(t)
|
||||
|
||||
c := &maaPatchCmd{log: slog.New(slog.NewTextHandler(logger.TestWriter{T: t}, nil)), patcher: tc.patcher}
|
||||
c := &maaPatchCmd{log: logger.NewTest(t), patcher: tc.patcher}
|
||||
err := c.patchMAA(&cobra.Command{}, tc.attestationURL)
|
||||
if tc.wantErr {
|
||||
require.Error(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue