From 4dda484b50d5faf7b90c17169a657409c44c44bd Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Thu, 19 Oct 2023 16:31:46 -0700 Subject: [PATCH] test logging --- lib/imgbundler/imgbundler_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/imgbundler/imgbundler_test.go b/lib/imgbundler/imgbundler_test.go index ff1a815df..ae381636d 100644 --- a/lib/imgbundler/imgbundler_test.go +++ b/lib/imgbundler/imgbundler_test.go @@ -12,6 +12,7 @@ import ( "sync" "testing" + "cdr.dev/slog/sloggers/slogtest" tassert "github.com/stretchr/testify/assert" "oss.terrastruct.com/d2/lib/log" @@ -49,7 +50,8 @@ func TestRegex(t *testing.T) { func TestInlineRemote(t *testing.T) { imgCache = sync.Map{} - ctx := log.WithTB(context.Background(), t, nil) + // we don't want log.Error to cause this test to fail + ctx := log.WithTB(context.Background(), t, &slogtest.Options{IgnoreErrors: true}) svgURL := "https://icons.terrastruct.com/essentials/004-picture.svg" pngURL := "https://cdn4.iconfinder.com/data/icons/smart-phones-technologies/512/android-phone.png"