Skip to content

STYLE.md: Discourage the use of seed repos for test data

Patrick Steinhardt requested to merge pks-doc-discourage-seeded-test-repos into master

With the upcoming transition to start supporting the SHA256 object hash in our repositories we will have to amend our tests to support both SHA1 and SHA256 object hashes. Due to our use of static seed repositories in many of our tests though this proving to be quite a burden as we have an abundance of hardcoded SHA1 hashes.

Discourage the use of seed repositories in favor of generating the data at runtime instead with our test helpers. This gives us agility when the object format of a repository changes as we don't depend on hardcoded information anymore, but in many cases it also speeds up test execution as we don't have to clone thousands of repositories on every test run anymore. Last but not least this also helps readers understand tests better given that they don't have to peek into the seed repositories to get an understanding of how the test data is arranged, but instead can learn about it by just reading through the now-explicit test data setup.

Closes #4308 (closed).

Edited by Patrick Steinhardt

Merge request reports