Skip to content

Disable metadata creation hack in remote service tests

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

This commit amends the remote 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.

RepositoryService is now set up and registered in the test setup as it's the service that is responsible for repository creations.

Some tests were updated to use the common setup helper to reduce cruft and to create the repository through the API. Creating the repository through the API doesn't set a remote, so TestFindRemoteRootRefSuccess was updated to just use the repository's path directly.

Related to: #4019 (closed)

Edited by Sami Hiltunen

Merge request reports