MCPcopy
hub / github.com/docker/docker-agent / TestSetToolStatus

Function TestSetToolStatus

pkg/tui/components/transcript/transcript_test.go:103–117  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

101}
102
103func TestSetToolStatus(t *testing.T) {
104 t.Parallel()
105 tr := newTestTranscript()
106 defer tr.StopAnimations()
107
108 call, def := toolCall("call-1")
109 _ = tr.Append(types.ToolCallMessage(testAgent, call, def, types.ToolStatusConfirmation))
110
111 _, ok := tr.SetToolStatus("call-1", types.ToolStatusRunning)
112 require.True(t, ok)
113 assert.Equal(t, types.ToolStatusRunning, tr.msgs[0].ToolStatus)
114
115 _, ok = tr.SetToolStatus("no-such-call", types.ToolStatusError)
116 assert.False(t, ok)
117}
118
119func TestFinalizeToolCalls(t *testing.T) {
120 t.Parallel()

Callers

nothing calls this directly

Calls 6

ToolCallMessageFunction · 0.92
newTestTranscriptFunction · 0.85
toolCallFunction · 0.85
StopAnimationsMethod · 0.80
SetToolStatusMethod · 0.80
AppendMethod · 0.45

Tested by

no test coverage detected