Skip to content

testcfg: Convert callers of `BuildWithRepo()` to `gittest.CreateRepo()`

Patrick Steinhardt requested to merge pks-testcfg-drop-gittest-dependency into master

The BuildWithRepo() function builds a Gitaly configuration and at the same time creates a seed repository. There's two issues with this:

- It is a layering violation as the configuration-related code
  should not depend on the repository-related logic. This means that
  e.g. the `gittest` package cannot depend on the `testcfg` package
  even though it is at a conceptually higher level.

- It hides away the parameters used to create the repository. This
  means that we use seed repositories by default, but also that we
  skip creation via the Repository service. Both are bad and should
  require the caller to explicitly state that they want this.

Convert callers of BuildWithRepo() to instead use Build() to build the configuration and gittest.CreateRepo() to create the repository. Remove the now-unused BuildWithRepo() function.

Merge request reports