Skip to content

Disable metadata creation hack in remoterepo package tests

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

This commit amends the remoterepo packages'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.

As localrepo and remoterepo share the test suite for the common functionality, the parts of the localrepo package that use the common suite had to be adjusted as well. The test suite was changed to receive a new repositroy from the getRepository factory rather than provide the repository to be wrapped. This allows for both of the implementations to construct the repository as needed. The localrepo package still just initiates the repos as it did before but the remoterepo package does it via the API now.

Related to: #4019 (closed)

Merge request reports

Loading