From 2a2af20f94db66095bd4315d07d7c714e9e1f205 Mon Sep 17 00:00:00 2001 From: Keepers Date: Fri, 28 Oct 2022 07:32:47 -0600 Subject: [PATCH] revert DPanic log to Error in support pkg (#1340) ## Description The panic in development mode is interfering with test scrutiny and other general behavior. Errors will be reported naturally without the need for this additional panic. ## Type of change - [x] :robot: Test - [x] :hamster: Trivial/Minor ## Issue(s) * #902 ## Test Plan - [x] :green_heart: E2E --- src/internal/connector/support/status.go | 4 ++-- src/internal/connector/support/status_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/internal/connector/support/status.go b/src/internal/connector/support/status.go index cf6668a5f..6209bd01a 100644 --- a/src/internal/connector/support/status.go +++ b/src/internal/connector/support/status.go @@ -77,12 +77,12 @@ func CreateStatus( } if status.ObjectCount != status.errorCount+status.Successful { - logger.Ctx(ctx).DPanicw( + logger.Ctx(ctx).Errorw( "status object count does not match errors + successes", "objects", cm.Objects, "successes", cm.Successes, "numErrors", numErr, - "errors", err.Error()) + "errors", err) } return &status diff --git a/src/internal/connector/support/status_test.go b/src/internal/connector/support/status_test.go index 35d17d698..009994a5e 100644 --- a/src/internal/connector/support/status_test.go +++ b/src/internal/connector/support/status_test.go @@ -72,7 +72,7 @@ func (suite *GCStatusTestSuite) TestCreateStatus_InvalidStatus() { t := suite.T() params := statusParams{Backup, 9, 3, 13, errors.New("invalidcl")} - require.Panics(t, func() { + require.NotPanics(t, func() { ctx, flush := tester.NewContext() defer flush()