(t *testing.T)
| 207 | } |
| 208 | |
| 209 | func 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 | |
| 216 | func TestHooksStop(t *testing.T) { |
| 217 | h := new(Hooks) |