Fix kopia test panics if repo is nil (#168)
This commit is contained in:
parent
042f3eaaee
commit
53c7b4a149
@ -69,7 +69,7 @@ func (suite *KopiaIntegrationSuite) TestCloseTwiceDoesNotCrash() {
|
|||||||
timeOfTest := ctesting.LogTimeOfTest(suite.T())
|
timeOfTest := ctesting.LogTimeOfTest(suite.T())
|
||||||
|
|
||||||
k, err := openKopiaRepo(ctx, "init-s3-"+timeOfTest)
|
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.NoError(suite.T(), k.Close(ctx))
|
||||||
assert.Nil(suite.T(), k.rep)
|
assert.Nil(suite.T(), k.rep)
|
||||||
assert.NoError(suite.T(), k.Close(ctx))
|
assert.NoError(suite.T(), k.Close(ctx))
|
||||||
@ -80,7 +80,7 @@ func (suite *KopiaIntegrationSuite) TestBackupCollections() {
|
|||||||
timeOfTest := ctesting.LogTimeOfTest(suite.T())
|
timeOfTest := ctesting.LogTimeOfTest(suite.T())
|
||||||
|
|
||||||
k, err := openKopiaRepo(ctx, "init-s3-"+timeOfTest)
|
k, err := openKopiaRepo(ctx, "init-s3-"+timeOfTest)
|
||||||
assert.NoError(suite.T(), err)
|
require.NoError(suite.T(), err)
|
||||||
defer func() {
|
defer func() {
|
||||||
assert.NoError(suite.T(), k.Close(ctx))
|
assert.NoError(suite.T(), k.Close(ctx))
|
||||||
}()
|
}()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user