(t *testing.T)
| 680 | } |
| 681 | |
| 682 | func Test_executeOnPreShutdownHooks_Error(t *testing.T) { |
| 683 | t.Parallel() |
| 684 | app := New() |
| 685 | |
| 686 | app.Hooks().OnPreShutdown(func() error { |
| 687 | return errors.New("pre error") |
| 688 | }) |
| 689 | |
| 690 | var buf bytes.Buffer |
| 691 | log.SetOutput(&buf) |
| 692 | app.hooks.executeOnPreShutdownHooks() |
| 693 | require.NotZero(t, buf.Len()) |
| 694 | } |
| 695 | |
| 696 | func Test_executeOnForkHooks_Error(t *testing.T) { |
| 697 | t.Parallel() |
nothing calls this directly
no test coverage detected