MCPcopy
hub / github.com/cloudflare/cloudflared / TestManagerErrorChannel

Function TestManagerErrorChannel

overwatch/manager_test.go:65–77  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

63}
64
65func TestManagerErrorChannel(t *testing.T) {
66 errChan := make(chan error)
67 serviceCallback := func(t string, name string, err error) {
68 errChan <- err
69 }
70 m := NewAppManager(serviceCallback)
71
72 err := errors.New("test error")
73 first := &mockService{serviceName: "first", serviceType: "mock", runError: err}
74 m.Add(first)
75 respErr := <-errChan
76 assert.Equal(t, err, respErr, "errors don't match")
77}

Callers

nothing calls this directly

Calls 3

AddMethod · 0.95
NewAppManagerFunction · 0.85
EqualMethod · 0.65

Tested by

no test coverage detected