Move output prefix from 60d388c4c2 to the inner test

This commit is contained in:
David Dworken 2023-10-22 11:07:59 -07:00
parent 8b9e3dfb10
commit 083569be17
No known key found for this signature in database

View File

@ -138,7 +138,6 @@ func TestPanicGuardNoPanic(t *testing.T) {
} }
func TestMergeMiddlewares(t *testing.T) { func TestMergeMiddlewares(t *testing.T) {
fmt.Println("Output prefix to avoid breaking gotestsum with panics")
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK) w.WriteHeader(http.StatusOK)
w.Write([]byte("test")) w.Write([]byte("test"))
@ -175,6 +174,7 @@ func TestMergeMiddlewares(t *testing.T) {
for _, test := range tests { for _, test := range tests {
t.Run(test.name, func(t *testing.T) { t.Run(test.name, func(t *testing.T) {
fmt.Println("Output prefix to avoid breaking gotestsum with panics")
var out strings.Builder var out strings.Builder
middlewares := mergeMiddlewares( middlewares := mergeMiddlewares(
withPanicGuard(nil), withPanicGuard(nil),