From 6fa4a74dd944d1c7780c80e9e965b65c66da7fd4 Mon Sep 17 00:00:00 2001 From: Geoff Franks Date: Mon, 9 Sep 2024 15:42:34 +0000 Subject: [PATCH] Adjust tests for golang 1.21+ behavior changes when handling panic(nil) --- logger_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/logger_test.go b/logger_test.go index 98a0986..1d4a527 100644 --- a/logger_test.go +++ b/logger_test.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" "net/http" + "runtime" "strconv" "time" @@ -368,7 +369,7 @@ var _ = Describe("Logger", func() { }) It("panics with the provided error (i.e. nil)", func() { - Expect(fatalErr).To(BeNil()) + Expect(fatalErr).To(MatchError(&runtime.PanicNilError{})) }) })