Use updated version of kopia that has proper in-memory caching (#3958)
Update kopia version and remove now-unneeded code from tests --- #### Does this PR need a docs update or release note? - [ ] ✅ Yes, it's included - [ ] 🕐 Yes, but in a later PR - [x] ⛔ No #### Type of change - [ ] 🌻 Feature - [x] 🐛 Bugfix - [ ] 🗺️ Documentation - [ ] 🤖 Supportability/Tests - [ ] 💻 CI/Deployment - [ ] 🧹 Tech Debt/Cleanup #### Issue(s) * #3519 #### Test Plan - [ ] 💪 Manual - [x] ⚡ Unit test - [ ] 💚 E2E
This commit is contained in:
parent
cc8b2ac53d
commit
d46cb1e3b6
@ -2,7 +2,7 @@ module github.com/alcionai/corso/src
|
|||||||
|
|
||||||
go 1.20
|
go 1.20
|
||||||
|
|
||||||
replace github.com/kopia/kopia => github.com/alcionai/kopia v0.12.2-0.20230713235606-4c85869e9377
|
replace github.com/kopia/kopia => github.com/alcionai/kopia v0.12.2-0.20230803184432-5f2a35eade6b
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0
|
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0
|
||||||
|
|||||||
@ -55,8 +55,8 @@ github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpH
|
|||||||
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo=
|
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo=
|
||||||
github.com/alcionai/clues v0.0.0-20230728164842-7dc4795a43e4 h1:husF7eAYw2HEzgjfAmNy+ZLzyztJV2SyoUngSUo829Y=
|
github.com/alcionai/clues v0.0.0-20230728164842-7dc4795a43e4 h1:husF7eAYw2HEzgjfAmNy+ZLzyztJV2SyoUngSUo829Y=
|
||||||
github.com/alcionai/clues v0.0.0-20230728164842-7dc4795a43e4/go.mod h1:MLEWSZ0cjEMg6hiGCRvE7AtrOhs7deBcm7ZrJBpfGRM=
|
github.com/alcionai/clues v0.0.0-20230728164842-7dc4795a43e4/go.mod h1:MLEWSZ0cjEMg6hiGCRvE7AtrOhs7deBcm7ZrJBpfGRM=
|
||||||
github.com/alcionai/kopia v0.12.2-0.20230713235606-4c85869e9377 h1:w50/aVU+zRP5lvE86TSSCCYrrEyuXOlJA06R5RdTS8Y=
|
github.com/alcionai/kopia v0.12.2-0.20230803184432-5f2a35eade6b h1:pkTllM0wtHVFnHfI3vXPYh1ObD4FKo2G2G/qWqzmIfY=
|
||||||
github.com/alcionai/kopia v0.12.2-0.20230713235606-4c85869e9377/go.mod h1:WH725ws0BYpZpTkVh4uqFHHPiiJuirl1Cm73jv5RYyA=
|
github.com/alcionai/kopia v0.12.2-0.20230803184432-5f2a35eade6b/go.mod h1:WH725ws0BYpZpTkVh4uqFHHPiiJuirl1Cm73jv5RYyA=
|
||||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||||
|
|||||||
@ -369,26 +369,6 @@ func checkRetentionParams(
|
|||||||
expectExtend(t, params.ExtendObjectLocks, "extend object locks")
|
expectExtend(t, params.ExtendObjectLocks, "extend object locks")
|
||||||
}
|
}
|
||||||
|
|
||||||
// mustReopen closes and reopens the connection that w uses. Assumes no other
|
|
||||||
// structs besides w are holding a reference to the conn that w has.
|
|
||||||
// TODO(ashmrtn): Remove this when kopia caching is fixed.
|
|
||||||
//
|
|
||||||
//revive:disable-next-line:context-as-argument
|
|
||||||
func mustReopen(t *testing.T, ctx context.Context, w *Wrapper) {
|
|
||||||
k := w.c
|
|
||||||
|
|
||||||
err := w.Close(ctx)
|
|
||||||
require.NoError(t, err, "closing wrapper: %v", clues.ToCore(err))
|
|
||||||
|
|
||||||
err = k.Close(ctx)
|
|
||||||
require.NoError(t, err, "closing conn: %v", clues.ToCore(err))
|
|
||||||
|
|
||||||
err = k.Connect(ctx, repository.Options{})
|
|
||||||
require.NoError(t, err, "reconnecting conn: %v", clues.ToCore(err))
|
|
||||||
|
|
||||||
w.c = k
|
|
||||||
}
|
|
||||||
|
|
||||||
type RetentionIntegrationSuite struct {
|
type RetentionIntegrationSuite struct {
|
||||||
tester.Suite
|
tester.Suite
|
||||||
}
|
}
|
||||||
@ -520,7 +500,6 @@ func (suite *RetentionIntegrationSuite) TestSetRetentionParameters() {
|
|||||||
err = w.SetRetentionParameters(ctx, test.opts)
|
err = w.SetRetentionParameters(ctx, test.opts)
|
||||||
test.expectErr(t, err, clues.ToCore(err))
|
test.expectErr(t, err, clues.ToCore(err))
|
||||||
|
|
||||||
mustReopen(t, ctx, w)
|
|
||||||
checkRetentionParams(
|
checkRetentionParams(
|
||||||
t,
|
t,
|
||||||
ctx,
|
ctx,
|
||||||
@ -562,7 +541,6 @@ func (suite *RetentionIntegrationSuite) TestSetRetentionParameters_And_Maintenan
|
|||||||
})
|
})
|
||||||
require.NoError(t, err, clues.ToCore(err))
|
require.NoError(t, err, clues.ToCore(err))
|
||||||
|
|
||||||
mustReopen(t, ctx, w)
|
|
||||||
checkRetentionParams(
|
checkRetentionParams(
|
||||||
t,
|
t,
|
||||||
ctx,
|
ctx,
|
||||||
@ -577,7 +555,6 @@ func (suite *RetentionIntegrationSuite) TestSetRetentionParameters_And_Maintenan
|
|||||||
})
|
})
|
||||||
require.NoError(t, err, clues.ToCore(err))
|
require.NoError(t, err, clues.ToCore(err))
|
||||||
|
|
||||||
mustReopen(t, ctx, w)
|
|
||||||
checkRetentionParams(
|
checkRetentionParams(
|
||||||
t,
|
t,
|
||||||
ctx,
|
ctx,
|
||||||
@ -592,7 +569,6 @@ func (suite *RetentionIntegrationSuite) TestSetRetentionParameters_And_Maintenan
|
|||||||
})
|
})
|
||||||
require.NoError(t, err, clues.ToCore(err))
|
require.NoError(t, err, clues.ToCore(err))
|
||||||
|
|
||||||
mustReopen(t, ctx, w)
|
|
||||||
checkRetentionParams(
|
checkRetentionParams(
|
||||||
t,
|
t,
|
||||||
ctx,
|
ctx,
|
||||||
@ -607,7 +583,6 @@ func (suite *RetentionIntegrationSuite) TestSetRetentionParameters_And_Maintenan
|
|||||||
})
|
})
|
||||||
require.NoError(t, err, clues.ToCore(err))
|
require.NoError(t, err, clues.ToCore(err))
|
||||||
|
|
||||||
mustReopen(t, ctx, w)
|
|
||||||
checkRetentionParams(
|
checkRetentionParams(
|
||||||
t,
|
t,
|
||||||
ctx,
|
ctx,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user