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

Function TestProcessAttachment_MissingFile_Error

pkg/chat/attach_test.go:204–212  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

202}
203
204func TestProcessAttachment_MissingFile_Error(t *testing.T) {
205 t.Parallel()
206 _, err := chat.ProcessAttachment(t.Context(), chat.MessagePart{
207 Type: chat.MessagePartTypeFile,
208 File: &chat.MessageFile{Path: "/nonexistent/path/file.jpg"},
209 })
210 require.Error(t, err)
211 assert.Contains(t, err.Error(), "cannot stat")
212}
213
214func TestProcessAttachment_NilFile_Error(t *testing.T) {
215 t.Parallel()

Callers

nothing calls this directly

Calls 3

ProcessAttachmentFunction · 0.92
ContextMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected