(t *testing.T)
| 694 | } |
| 695 | |
| 696 | func Test_executeOnForkHooks_Error(t *testing.T) { |
| 697 | t.Parallel() |
| 698 | app := New() |
| 699 | |
| 700 | app.Hooks().OnFork(func(pid int) error { |
| 701 | require.Equal(t, 1, pid) |
| 702 | return errors.New("fork error") |
| 703 | }) |
| 704 | |
| 705 | var buf bytes.Buffer |
| 706 | log.SetOutput(&buf) |
| 707 | app.hooks.executeOnForkHooks(1) |
| 708 | require.NotZero(t, buf.Len()) |
| 709 | } |
| 710 | |
| 711 | func Test_executeOnMountHooks_Error(t *testing.T) { |
| 712 | t.Parallel() |