DevHeads.net

New "tests" namespace to share test code

Hi!

While working on adding CI tests [0] using the Standard Test
Interface a need arose to have a shared git repository where tests
could be stored:

* A large number of test files makes a dist-git repository more
difficult to maintain

* Tests might follow a different branching pattern than the
dist-git repo, leading to code duplication

* Shared maintenance for tests sometimes benefits from different
access levels than the release dist-git repository

The plan is to create a new “tests” namespace in Fedora git/pagure
dedicated to storing the shared test code. To enable execution of
these tests by the CI pipeline, tests.yml file in dist-git will be
used to link the tests in the standard way as defined by the
Standard Test Interface [1].

This approach should help to efficiently maintain tests & minimize
test code duplication. Using a dedicated git repo for test code
also means to keep dist-git more as a place for storing metadata
only: Build metadata (spec file = how to build the package) and
test metadata (tests.yml = how to test the package) rather than
mixing spec files with test code itself.

Please note that this does not mean that all tests should now go
into this new namespace. You can still link tests directly from
upstream (like GitHub) or any other source. Also, for unit tests
it makes more sense to be kept directly with the project source
and executed there. Shared tests namespace in Fedora will be
suitable especially for functional and integration testing which
should help to continuously ensure the OS works as a whole.

For more detailed motivation and real-life examples see the Share
Test Code proposal on the Fedora CI list [2]. If you have any
questions or comments feel free to share them here or in the
pagure issue requesting the new namespace:

<a href="https://pagure.io/fedora-infrastructure/issue/6478" title="https://pagure.io/fedora-infrastructure/issue/6478">https://pagure.io/fedora-infrastructure/issue/6478</a>

Thanks.

psss...

[0] <a href="https://fedoraproject.org/wiki/CI" title="https://fedoraproject.org/wiki/CI">https://fedoraproject.org/wiki/CI</a>
[1] <a href="https://fedoraproject.org/wiki/Changes/InvokingTests" title="https://fedoraproject.org/wiki/Changes/InvokingTests">https://fedoraproject.org/wiki/Changes/InvokingTests</a>
[2] <a href="https://lists.fedoraproject.org/archives/list/ ... at lists dot fedoraproject.org/thread/55U6V6UHA54MJLD2F6JF46EOLMVRUAE7/" title="https://lists.fedoraproject.org/archives/list/ ... at lists dot fedoraproject.org/thread/55U6V6UHA54MJLD2F6JF46EOLMVRUAE7/">https://lists.fedoraproject.org/archives/list/ ... at lists dot fedoraproject.org...</a>