Skip to content

Commit 0eba5b8

Browse files
committed
formatting fix
1 parent 4870b9d commit 0eba5b8

3 files changed

Lines changed: 17 additions & 16 deletions

File tree

internal/integrationtest/circuit_breaker_test.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func TestCircuitBreaker_FullRecoveryCycle(t *testing.T) {
4545
successBody string
4646
requestBody string
4747
headers http.Header
48-
path string
48+
path string
4949
createProvider func(baseURL string, cbConfig *config.CircuitBreaker) provider.Provider
5050
expectProvider string
5151
expectEndpoint string
@@ -62,8 +62,8 @@ func TestCircuitBreaker_FullRecoveryCycle(t *testing.T) {
6262
successBody: anthropicSuccessResponse("claude-sonnet-4-20250514"),
6363
requestBody: `{"model":"claude-sonnet-4-20250514","max_tokens":1024,"messages":[{"role":"user","content":"hi"}]}`,
6464
headers: http.Header{
65-
"x-api-key": {"test"},
66-
"anthropic-version": {"2023-06-01"},
65+
"x-api-key": {"test"},
66+
"anthropic-version": {"2023-06-01"},
6767
},
6868
path: pathAnthropicMessages,
6969
createProvider: func(baseURL string, cbConfig *config.CircuitBreaker) provider.Provider {
@@ -82,8 +82,8 @@ func TestCircuitBreaker_FullRecoveryCycle(t *testing.T) {
8282
errorBody: openAIRateLimitError,
8383
successBody: openAISuccessResponse("gpt-4o"),
8484
requestBody: `{"model":"gpt-4o","messages":[{"role":"user","content":"hi"}]}`,
85-
headers: http.Header{"Authorization": {"Bearer test-key"}},
86-
path: pathOpenAIChatCompletions,
85+
headers: http.Header{"Authorization": {"Bearer test-key"}},
86+
path: pathOpenAIChatCompletions,
8787
createProvider: func(baseURL string, cbConfig *config.CircuitBreaker) provider.Provider {
8888
return provider.NewOpenAI(config.OpenAI{
8989
BaseURL: baseURL,
@@ -210,7 +210,7 @@ func TestCircuitBreaker_HalfOpenFailure(t *testing.T) {
210210
errorBody string
211211
requestBody string
212212
headers http.Header
213-
path string
213+
path string
214214
createProvider func(baseURL string, cbConfig *config.CircuitBreaker) provider.Provider
215215
expectProvider string
216216
expectEndpoint string
@@ -226,8 +226,8 @@ func TestCircuitBreaker_HalfOpenFailure(t *testing.T) {
226226
errorBody: anthropicRateLimitError,
227227
requestBody: `{"model":"claude-sonnet-4-20250514","max_tokens":1024,"messages":[{"role":"user","content":"hi"}]}`,
228228
headers: http.Header{
229-
"x-api-key": {"test"},
230-
"anthropic-version": {"2023-06-01"},
229+
"x-api-key": {"test"},
230+
"anthropic-version": {"2023-06-01"},
231231
},
232232
path: pathAnthropicMessages,
233233
createProvider: func(baseURL string, cbConfig *config.CircuitBreaker) provider.Provider {
@@ -245,8 +245,8 @@ func TestCircuitBreaker_HalfOpenFailure(t *testing.T) {
245245
expectModel: "gpt-4o",
246246
errorBody: openAIRateLimitError,
247247
requestBody: `{"model":"gpt-4o","messages":[{"role":"user","content":"hi"}]}`,
248-
headers: http.Header{"Authorization": {"Bearer test-key"}},
249-
path: pathOpenAIChatCompletions,
248+
headers: http.Header{"Authorization": {"Bearer test-key"}},
249+
path: pathOpenAIChatCompletions,
250250
createProvider: func(baseURL string, cbConfig *config.CircuitBreaker) provider.Provider {
251251
return provider.NewOpenAI(config.OpenAI{
252252
BaseURL: baseURL,
@@ -345,7 +345,7 @@ func TestCircuitBreaker_HalfOpenMaxRequests(t *testing.T) {
345345
successBody string
346346
requestBody string
347347
headers http.Header
348-
path string
348+
path string
349349
createProvider func(baseURL string, cbConfig *config.CircuitBreaker) provider.Provider
350350
expectProvider string
351351
expectEndpoint string
@@ -362,8 +362,8 @@ func TestCircuitBreaker_HalfOpenMaxRequests(t *testing.T) {
362362
successBody: anthropicSuccessResponse("claude-sonnet-4-20250514"),
363363
requestBody: `{"model":"claude-sonnet-4-20250514","max_tokens":1024,"messages":[{"role":"user","content":"hi"}]}`,
364364
headers: http.Header{
365-
"x-api-key": {"test"},
366-
"anthropic-version": {"2023-06-01"},
365+
"x-api-key": {"test"},
366+
"anthropic-version": {"2023-06-01"},
367367
},
368368
path: pathAnthropicMessages,
369369
createProvider: func(baseURL string, cbConfig *config.CircuitBreaker) provider.Provider {
@@ -382,8 +382,8 @@ func TestCircuitBreaker_HalfOpenMaxRequests(t *testing.T) {
382382
errorBody: openAIRateLimitError,
383383
successBody: openAISuccessResponse("gpt-4o"),
384384
requestBody: `{"model":"gpt-4o","messages":[{"role":"user","content":"hi"}]}`,
385-
headers: http.Header{"Authorization": {"Bearer test-key"}},
386-
path: pathOpenAIChatCompletions,
385+
headers: http.Header{"Authorization": {"Bearer test-key"}},
386+
path: pathOpenAIChatCompletions,
387387
createProvider: func(baseURL string, cbConfig *config.CircuitBreaker) provider.Provider {
388388
return provider.NewOpenAI(config.OpenAI{
389389
BaseURL: baseURL,

internal/integrationtest/trace_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ import (
1818
"github.com/tidwall/sjson"
1919
"go.opentelemetry.io/otel/attribute"
2020
"go.opentelemetry.io/otel/codes"
21-
oteltrace "go.opentelemetry.io/otel/trace"
2221
sdktrace "go.opentelemetry.io/otel/sdk/trace"
2322
"go.opentelemetry.io/otel/sdk/trace/tracetest"
23+
oteltrace "go.opentelemetry.io/otel/trace"
2424
)
2525

2626
// expect 'count' amount of traces named 'name' with status 'status'

internal/testutil/mock_recorder.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ func (m *MockRecorder) RecordedTokenUsages() []*recorder.TokenUsageRecord {
7373
defer m.mu.Unlock()
7474
return slices.Clone(m.tokenUsages)
7575
}
76+
7677
// TotalInputTokens returns the sum of input tokens across all recorded token usages.
7778
func (m *MockRecorder) TotalInputTokens() int64 {
7879
var total int64

0 commit comments

Comments
 (0)