Skip to content

Commit 70fea88

Browse files
committed
recorder cleanup
1 parent 3d5bd76 commit 70fea88

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

internal/integrationtest/trace_test.go

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,8 @@ func TestTraceAnthropic(t *testing.T) {
123123
defer resp.Body.Close()
124124
bridgeServer.Close()
125125

126-
recorder := bridgeServer.Recorder
127-
require.Equal(t, 1, len(recorder.RecordedInterceptions()))
128-
intcID := recorder.RecordedInterceptions()[0].ID
126+
require.Equal(t, 1, len(bridgeServer.Recorder.RecordedInterceptions()))
127+
intcID := bridgeServer.Recorder.RecordedInterceptions()[0].ID
129128

130129
model := gjson.Get(string(reqBody), "model").Str
131130
if tc.bedrock {
@@ -239,9 +238,8 @@ func TestTraceAnthropicErr(t *testing.T) {
239238
defer resp.Body.Close()
240239
bridgeServer.Close()
241240

242-
recorder := bridgeServer.Recorder
243-
require.Equal(t, 1, len(recorder.RecordedInterceptions()))
244-
intcID := recorder.RecordedInterceptions()[0].ID
241+
require.Equal(t, 1, len(bridgeServer.Recorder.RecordedInterceptions()))
242+
intcID := bridgeServer.Recorder.RecordedInterceptions()[0].ID
245243

246244
totalCount := 0
247245
for _, e := range tc.expect {
@@ -479,9 +477,8 @@ func TestTraceOpenAI(t *testing.T) {
479477
defer resp.Body.Close()
480478
bridgeServer.Close()
481479

482-
recorder := bridgeServer.Recorder
483-
require.Equal(t, 1, len(recorder.RecordedInterceptions()))
484-
intcID := recorder.RecordedInterceptions()[0].ID
480+
require.Equal(t, 1, len(bridgeServer.Recorder.RecordedInterceptions()))
481+
intcID := bridgeServer.Recorder.RecordedInterceptions()[0].ID
485482

486483
totalCount := 0
487484
for _, e := range tc.expect {
@@ -637,9 +634,8 @@ func TestTraceOpenAIErr(t *testing.T) {
637634
defer resp.Body.Close()
638635
bridgeServer.Close()
639636

640-
recorder := bridgeServer.Recorder
641-
require.Equal(t, 1, len(recorder.RecordedInterceptions()))
642-
intcID := recorder.RecordedInterceptions()[0].ID
637+
require.Equal(t, 1, len(bridgeServer.Recorder.RecordedInterceptions()))
638+
intcID := bridgeServer.Recorder.RecordedInterceptions()[0].ID
643639

644640
totalCount := 0
645641
for _, e := range tc.expect {

0 commit comments

Comments
 (0)