MCPcopy Index your code
hub / github.com/coder/coder / fakeStoreFile

Function fakeStoreFile

coderd/x/chatd/chattool/proposeplan_test.go:632–646  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

630}
631
632func fakeStoreFile(t *testing.T) (chattool.StoreFileFunc, *[]byte) {
633 t.Helper()
634
635 var stored []byte
636 return func(_ context.Context, name string, detectName string, data []byte) (chattool.AttachmentMetadata, error) {
637 assert.NotEmpty(t, name)
638 assert.NotEmpty(t, detectName)
639 stored = append([]byte(nil), data...)
640 return chattool.AttachmentMetadata{
641 FileID: uuid.MustParse("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
642 MediaType: "text/markdown",
643 Name: name,
644 }, nil
645 }, &stored
646}
647
648func decodeProposePlanResponse(t *testing.T, resp fantasy.ToolResponse) proposePlanResponse {
649 t.Helper()

Callers 1

TestProposePlanFunction · 0.85

Calls 2

NotEmptyMethod · 0.80
HelperMethod · 0.65

Tested by

no test coverage detected