MustConnectOpenAnother opens another repository backed by the same storage, with independent config and cache options.
(tb testing.TB, openOpts ...func(*repo.Options))
| 203 | // MustConnectOpenAnother opens another repository backed by the same storage, |
| 204 | // with independent config and cache options. |
| 205 | func (e *Environment) MustConnectOpenAnother(tb testing.TB, openOpts ...func(*repo.Options)) repo.Repository { |
| 206 | tb.Helper() |
| 207 | |
| 208 | ctx := testlogging.Context(tb) |
| 209 | |
| 210 | config := filepath.Join(testutil.TempDirectory(tb), "kopia.config") |
| 211 | connOpts := &repo.ConnectOptions{ |
| 212 | CachingOptions: content.CachingOptions{ |
| 213 | CacheDirectory: testutil.TempDirectory(tb), |
| 214 | }, |
| 215 | } |
| 216 | |
| 217 | err := repo.Connect(ctx, config, e.st, e.Password, connOpts) |
| 218 | require.NoError(tb, err, "can't connect") |
| 219 | |
| 220 | rep, err := repo.Open(ctx, e.ConfigFile(), e.Password, repoOptions(openOpts)) |
| 221 | require.NoError(tb, err, "can't open") |
| 222 | |
| 223 | return rep |
| 224 | } |
| 225 | |
| 226 | // VerifyBlobCount verifies that the underlying storage contains the specified number of blobs. |
| 227 | func (e *Environment) VerifyBlobCount(tb testing.TB, want int) { |