From 13c5b9fe5adcaf6dd95cab0455900cbbe8b86138 Mon Sep 17 00:00:00 2001 From: ashmrtn <3891298+ashmrtn@users.noreply.github.com> Date: Tue, 3 Oct 2023 08:34:11 -0700 Subject: [PATCH] Use separate config dirs for kopia in file system mode (#4423) Fixes possible issues of opening the incorrect repo if tests are run in parallel. Integration test for this in [model_store_test.go](https://github.com/alcionai/corso/blob/3d78183651289e2051b8690850069c9b41df6bd0/src/internal/kopia/model_store_test.go#L897) --- #### Does this PR need a docs update or release note? - [ ] :white_check_mark: Yes, it's included - [ ] :clock1: Yes, but in a later PR - [x] :no_entry: No #### Type of change - [ ] :sunflower: Feature - [x] :bug: Bugfix - [ ] :world_map: Documentation - [ ] :robot: Supportability/Tests - [ ] :computer: CI/Deployment - [ ] :broom: Tech Debt/Cleanup #### Issue(s) * #4422 #### Test Plan - [ ] :muscle: Manual - [x] :zap: Unit test - [ ] :green_heart: E2E --- src/pkg/storage/testdata/storage.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pkg/storage/testdata/storage.go b/src/pkg/storage/testdata/storage.go index 227a959bb..0653ee0fd 100644 --- a/src/pkg/storage/testdata/storage.go +++ b/src/pkg/storage/testdata/storage.go @@ -68,6 +68,9 @@ func NewFilesystemStorage(t tester.TestT) storage.Storage { }, storage.CommonConfig{ Corso: GetAndInsertCorso(""), + // Use separate kopia configs for each instance. Place in a new folder to + // avoid mixing data. + KopiaCfgDir: t.TempDir(), }) require.NoError(t, err, "creating storage", clues.ToCore(err))