mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-08 23:12:18 -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 certcache
|
|||
import (
|
||||
"context"
|
||||
"crypto/x509"
|
||||
"log/slog"
|
||||
"testing"
|
||||
|
||||
"github.com/edgelesssys/constellation/v2/internal/attestation/variant"
|
||||
|
@ -121,7 +120,7 @@ func TestCreateCertChainCache(t *testing.T) {
|
|||
|
||||
c := &Client{
|
||||
attVariant: variant.Dummy{},
|
||||
log: slog.New(slog.NewTextHandler(logger.TestWriter{T: t}, nil)),
|
||||
log: logger.NewTest(t),
|
||||
kubeClient: tc.kubeClient,
|
||||
kdsClient: tc.kdsClient,
|
||||
}
|
||||
|
@ -207,7 +206,7 @@ func TestGetCertChainCache(t *testing.T) {
|
|||
|
||||
ctx := context.Background()
|
||||
|
||||
c := NewClient(slog.New(slog.NewTextHandler(logger.TestWriter{T: t}, nil)), tc.kubeClient, variant.Dummy{})
|
||||
c := NewClient(logger.NewTest(t), tc.kubeClient, variant.Dummy{})
|
||||
|
||||
ask, ark, err := c.getCertChainCache(ctx)
|
||||
if tc.wantErr {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue