| commit | a8cfb564d677c789ab1f4feebff436cd423b6d25 | [log] [tgz] |
|---|---|---|
| author | Jan Schär <jan@jschaer.ch> | Mon Apr 08 14:54:15 2024 +0200 |
| committer | Jan Schär <jan@jschaer.ch> | Thu Apr 11 13:32:06 2024 +0000 |
| tree | 9101f7c1b0f8052b1ae75582aea9f52047797cd0 | |
| parent | b976967d7baff84ab625fb774b4c016ad5fe4caa [diff] |
m/pkg/supervisor: propagate panic in TestHarness
Before this change, the following test passes, which is not what you
would expect:
func TestHarnessPanic(t *testing.T) {
TestHarness(t, func(ctx context.Context) error {
panic("PANIC!")
})
}
Change-Id: I3356241c022a75a552f8338e532196fb9100a307
Reviewed-on: https://review.monogon.dev/c/monogon/+/2920
Tested-by: Jenkins CI
Reviewed-by: Serge Bazanski <serge@monogon.tech>
Vouch-Run-CI: Serge Bazanski <serge@monogon.tech>
diff --git a/metropolis/pkg/supervisor/supervisor_testhelpers.go b/metropolis/pkg/supervisor/supervisor_testhelpers.go index 1a72ad8..d3f994f 100644 --- a/metropolis/pkg/supervisor/supervisor_testhelpers.go +++ b/metropolis/pkg/supervisor/supervisor_testhelpers.go
@@ -67,7 +67,7 @@ return err } return nil - }, WithExistingLogtree(lt)) + }, WithExistingLogtree(lt), WithPropagatePanic) t.Cleanup(func() { ctxC()