MCPcopy Create free account
hub / github.com/coder/coder / TestBasic

Function TestBasic

aibridge/intercept/actor_headers_test.go:21–36  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

19}
20
21func TestBasic(t *testing.T) {
22 t.Parallel()
23
24 actorID := uuid.NewString()
25 actor := &context.Actor{
26 ID: actorID,
27 }
28
29 // We can't peek inside since these opts require an internal type to apply onto.
30 // All we can do is check the length.
31 // See TestActorHeaders for an integration test.
32 oaiOpts := intercept.ActorHeadersAsOpenAIOpts(actor)
33 require.Len(t, oaiOpts, 1)
34 antOpts := intercept.ActorHeadersAsAnthropicOpts(actor)
35 require.Len(t, antOpts, 1)
36}
37
38func TestBasicAndMetadata(t *testing.T) {
39 t.Parallel()

Callers

nothing calls this directly

Calls 3

ActorHeadersAsOpenAIOptsFunction · 0.92
LenMethod · 0.45

Tested by

no test coverage detected