Skip to content

Disable metadata creation hack in ssh service tests

Sami Hiltunen requested to merge smh-create-repo-ssh into master

This commit amends the ssh service's tests to not rely on Praefect's metadata force creation hack. The hack creates metadata for repositories when Praefect first sees a request for the repository. This has potential to hide problems in tests and doesn't match the production scenario. To prepare for removing the hack entirely, this commit refactors the tests to create the test repositories through the API rather than placing them directly in the storage.

Some tests had to be adapted as Praefect is returning different error codes than Gitaly in some cases.

The setupSSHClone helper used by some tests was unnecessarily complex as it was doing unnecessary copies of the test repository. It was simplified a bit to make it easier to ensure all repos are created through the API.

Related to: #4019 (closed)

Merge request reports