MCPcopy Create free account
hub / github.com/codehamr/codehamr / TestChatUnreachable

Function TestChatUnreachable

internal/llm/llm_test.go:509–519  ·  view source on GitHub ↗

TestChatUnreachable: transport failure surfaces as ErrUnreachable.

(t *testing.T)

Source from the content-addressed store, hash-verified

507
508// TestChatUnreachable: transport failure surfaces as ErrUnreachable. Retries
509// off: this test pins the terminal error surface, not the retry path.
510func TestChatUnreachable(t *testing.T) {
511 c := New("http://127.0.0.1:1", "m", "")
512 c.RetryBackoff = nil
513 evs := collect(c.Chat(context.Background(), nil, nil))
514 if len(evs) != 1 {
515 t.Fatalf("want single event, got %d", len(evs))
516 }
517 var un cloud.ErrUnreachable
518 if !errors.As(evs[0].Err, &un) {
519 t.Fatalf("want ErrUnreachable, got %v", evs[0].Err)
520 }
521}
522

Callers

nothing calls this directly

Calls 3

collectFunction · 0.85
ChatMethod · 0.80
NewFunction · 0.70

Tested by

no test coverage detected