mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-11 08:20:16 -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
|
@ -9,7 +9,6 @@ package recoveryserver
|
|||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"log/slog"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
|
@ -36,7 +35,7 @@ func TestMain(m *testing.M) {
|
|||
|
||||
func TestServe(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
log := slog.New(slog.NewTextHandler(logger.TestWriter{T: t}, nil))
|
||||
log := logger.NewTest(t)
|
||||
uuid := "uuid"
|
||||
server := New(atls.NewFakeIssuer(variant.Dummy{}), newStubKMS(nil, nil), log)
|
||||
dialer := testdialer.NewBufconnDialer()
|
||||
|
@ -107,7 +106,7 @@ func TestRecover(t *testing.T) {
|
|||
|
||||
ctx := context.Background()
|
||||
serverUUID := "uuid"
|
||||
server := New(atls.NewFakeIssuer(variant.Dummy{}), tc.factory, slog.New(slog.NewTextHandler(logger.TestWriter{T: t}, nil)))
|
||||
server := New(atls.NewFakeIssuer(variant.Dummy{}), tc.factory, logger.NewTest(t))
|
||||
netDialer := testdialer.NewBufconnDialer()
|
||||
listener := netDialer.GetListener("192.0.2.1:1234")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue