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](3d78183651/src/internal/kopia/model_store_test.go (L897))

---

#### 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)

* #4422

#### Test Plan

- [ ] 💪 Manual
- [x]  Unit test
- [ ] 💚 E2E
This commit is contained in:
ashmrtn 2023-10-03 08:34:11 -07:00 committed by GitHub
parent 19111fe136
commit 13c5b9fe5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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))