From 53c7b4a149094229882e42430b1e355aa0a2a236 Mon Sep 17 00:00:00 2001 From: ashmrtn <3891298+ashmrtn@users.noreply.github.com> Date: Wed, 8 Jun 2022 13:28:32 -0700 Subject: [PATCH] Fix kopia test panics if repo is nil (#168) --- src/internal/kopia/kopia_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/internal/kopia/kopia_test.go b/src/internal/kopia/kopia_test.go index f682d66ea..77f24ba85 100644 --- a/src/internal/kopia/kopia_test.go +++ b/src/internal/kopia/kopia_test.go @@ -69,7 +69,7 @@ func (suite *KopiaIntegrationSuite) TestCloseTwiceDoesNotCrash() { timeOfTest := ctesting.LogTimeOfTest(suite.T()) k, err := openKopiaRepo(ctx, "init-s3-"+timeOfTest) - assert.NoError(suite.T(), err) + require.NoError(suite.T(), err) assert.NoError(suite.T(), k.Close(ctx)) assert.Nil(suite.T(), k.rep) assert.NoError(suite.T(), k.Close(ctx)) @@ -80,7 +80,7 @@ func (suite *KopiaIntegrationSuite) TestBackupCollections() { timeOfTest := ctesting.LogTimeOfTest(suite.T()) k, err := openKopiaRepo(ctx, "init-s3-"+timeOfTest) - assert.NoError(suite.T(), err) + require.NoError(suite.T(), err) defer func() { assert.NoError(suite.T(), k.Close(ctx)) }()