MCPcopy
hub / github.com/mudler/LocalAI / TestForward_RejectsWithoutLoad

Function TestForward_RejectsWithoutLoad

backend/go/cloud-proxy/proxy_test.go:187–197  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

185}
186
187func TestForward_RejectsWithoutLoad(t *testing.T) {
188 g := NewWithT(t)
189 cp := NewCloudProxy()
190 c := newInProcClient(t, cp)
191 stream, err := c.Forward(context.Background())
192 g.Expect(err).NotTo(HaveOccurred())
193 _ = stream.CloseSend()
194 _, err = stream.Recv()
195 g.Expect(err).To(HaveOccurred())
196 g.Expect(err.Error()).To(ContainSubstring("not loaded"))
197}
198
199func hasHeader(hs []*pb.ForwardHeader, name, value string) bool {
200 for _, h := range hs {

Callers

nothing calls this directly

Calls 6

NewCloudProxyFunction · 0.85
newInProcClientFunction · 0.85
ForwardMethod · 0.65
CloseSendMethod · 0.65
RecvMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected