Skip to content

Commit

Permalink
fixup! fixup! feat: add support for logging
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklasl committed Dec 6, 2024
1 parent 4380ad6 commit f8f4893
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pkg/confidence/confidence_context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package confidence

import (
"context"
"log/slog"
"reflect"
"testing"

Expand Down Expand Up @@ -102,6 +103,7 @@ func create_confidence(t *testing.T, response ResolveResponse) *Confidence {
Config: config,
ResolveClient: MockResolveClient{MockedResponse: response, MockedError: nil, TestingT: t},
contextMap: make(map[string]interface{}),
Logger: slog.Default(),
}
}

Expand All @@ -114,5 +116,6 @@ func createConfidenceWithUploader(t *testing.T, response ResolveResponse, upload
EventUploader: uploader,
ResolveClient: MockResolveClient{MockedResponse: response, MockedError: nil, TestingT: t},
contextMap: make(map[string]interface{}),
Logger: slog.Default(),
}
}
5 changes: 4 additions & 1 deletion pkg/confidence/confidence_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/stretchr/testify/assert"
"log/slog"
"reflect"
"testing"

"github.com/stretchr/testify/assert"
)

type MockResolveClient struct {
Expand Down Expand Up @@ -255,5 +257,6 @@ func newConfidence(apiKey string, client ResolveClient) *Confidence {
Config: config,
ResolveClient: client,
contextMap: make(map[string]interface{}),
Logger: slog.Default(),
}
}

0 comments on commit f8f4893

Please sign in to comment.