MCPcopy Index your code
hub / github.com/docker/docker-agent / TestGetMessages_CacheControl

Function TestGetMessages_CacheControl

pkg/session/session_test.go:191–205  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

189}
190
191func TestGetMessages_CacheControl(t *testing.T) {
192 t.Parallel()
193
194 testAgent := agent.New("root", "instructions", agent.WithToolSets(todoToolSet(t)))
195
196 s := New()
197 messages := s.GetMessages(testAgent)
198
199 assert.Len(t, messages, 2)
200 assert.Equal(t, "instructions", messages[0].Content)
201 assert.False(t, messages[0].CacheControl)
202
203 assert.Contains(t, messages[1].Content, "Todo Tools")
204 assert.True(t, messages[1].CacheControl)
205}
206
207func TestGetMessages_CacheControlWithSummary(t *testing.T) {
208 t.Parallel()

Callers

nothing calls this directly

Calls 6

NewFunction · 0.92
WithToolSetsFunction · 0.92
todoToolSetFunction · 0.85
GetMessagesMethod · 0.80
NewFunction · 0.70
LenMethod · 0.65

Tested by

no test coverage detected