fix: backrest should only initialize repos explicitly added through WebUI

This commit is contained in:
garethgeorge
2024-08-14 17:23:59 -07:00
parent 500f2ee6c0
commit 62a97a335d
3 changed files with 35 additions and 39 deletions

View File

@@ -668,6 +668,17 @@ func createSystemUnderTest(t *testing.T, config config.ConfigStore) systemUnderT
t.Fatalf("Failed to create orchestrator: %v", err)
}
for _, repo := range cfg.Repos {
rorch, err := orch.GetRepoOrchestrator(repo.Id)
if err != nil {
t.Fatalf("Failed to get repo %s: %v", repo.Id, err)
}
if err := rorch.Init(context.Background()); err != nil {
t.Fatalf("Failed to init repo %s: %v", repo.Id, err)
}
}
h := NewBackrestHandler(config, orch, oplog, logStore)
return systemUnderTest{