MCPcopy
hub / github.com/mochi-mqtt/server / TestHooksAddInitFailure

Function TestHooksAddInitFailure

hooks_test.go:209–214  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

207}
208
209func TestHooksAddInitFailure(t *testing.T) {
210 h := new(Hooks)
211 err := h.Add(new(modifiedHookBase), map[string]any{})
212 require.Error(t, err)
213 require.Equal(t, int64(0), atomic.LoadInt64(&h.qty))
214}
215
216func TestHooksStop(t *testing.T) {
217 h := new(Hooks)

Callers

nothing calls this directly

Calls 2

ErrorMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected