Files
CLIProxyAPI/sdk/api/handlers/handlers_metadata_test.go
T
Luis Pater e50cabac4b chore: upgrade CLIProxyAPI dependency to v7 across the project
- Updated all references from v6 to v7 for `github.com/router-for-me/CLIProxyAPI`.
- Ensured consistency in imports within core libraries, tests, and integration tests.
- Added missing tests for new features in Redis Protocol integration.
2026-05-08 11:46:46 +08:00

21 lines
652 B
Go

package handlers
import (
"testing"
coreexecutor "github.com/router-for-me/CLIProxyAPI/v7/sdk/cliproxy/executor"
"golang.org/x/net/context"
)
func TestRequestExecutionMetadataIncludesExecutionSessionWithoutIdempotencyKey(t *testing.T) {
ctx := WithExecutionSessionID(context.Background(), "session-1")
meta := requestExecutionMetadata(ctx)
if got := meta[coreexecutor.ExecutionSessionMetadataKey]; got != "session-1" {
t.Fatalf("ExecutionSessionMetadataKey = %v, want %q", got, "session-1")
}
if _, ok := meta[idempotencyKeyMetadataKey]; ok {
t.Fatalf("unexpected idempotency key in metadata: %v", meta[idempotencyKeyMetadataKey])
}
}