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

Function TestClassify_TransportByMessage

pkg/tools/lifecycle/classify_test.go:63–75  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

61}
62
63func TestClassify_TransportByMessage(t *testing.T) {
64 t.Parallel()
65 cases := []string{
66 "connection reset by peer",
67 "connection refused",
68 "write tcp ...: broken pipe",
69 "unexpected EOF",
70 }
71 for _, msg := range cases {
72 got := lifecycle.Classify(errors.New(msg))
73 assert.Check(t, errors.Is(got, lifecycle.ErrTransport), "msg=%q", msg)
74 }
75}
76
77func TestClassify_AlreadyClassifiedPasses(t *testing.T) {
78 t.Parallel()

Callers

nothing calls this directly

Calls 3

ClassifyFunction · 0.92
CheckMethod · 0.80
NewMethod · 0.45

Tested by

no test coverage detected