This commit:
- Adds KojiResolver class and KojiResolver tests.
- Changes the GenericResolver and its subclasses to pass base_module_mmds
instead of base_module_nsvc to get_buildrequired_modulemds. This is needed,
because KojiResolver needs to access XMD section of base module.
- Implements KojiResolver.get_buildrequired_modulemds to ask Koji for list of
modules tagged in the Koji tag and return their modulemds.
Since the tests now run in a different location in the container
since PR #1378, the documentation needed to be updated. Instead,
we should just allow the user to pass a relative path instead.
This removes support for default_modules_url in the Platform XMD and
gets the list of default name:stream combinations to include in the buildroot
from https://pagure.io/releng/fedora-module-defaults.
Addresses #1402
A base module can set xmd.mbs.default_modules_url, which contains a
URL to a list of modules in the format of name:stream separated by
new lines. When a module buildrequires this base module, the list
of default modules are added as buildrequires of the module automatically
unless there are conflicting streams or the default module is not
in the MBS database.
For example, contrib/run-unittests.sh /src/tests/test_utils ...
Please note that the path starts from /src, which is the root directory of
code inside container.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
This patch introduces a new environment variable in order to allow running
tests with different database backend. This is useful particularly for running
tests inside container. With this change, it is possible run tests in following
combinations:
* Python 2 and SQLite
* Python 3 and SQLite
* Python 2 and PostgreSQL
* Python 3 and PostgreSQL
Package python-psycopg2 is installed in both Dockerfile-tests and
Dockerfile-tests-py3 in case of running tests with PostgreSQL.
A new script contrib/run-unittests.sh is added to make it easy to run tests. An
example:
contrib/run-unittests.sh --py3 --with-pgsql
that runs tests with Python 3 and PostgreSQL.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
Recommend using podman instead of docker because:
* one can spin up containers without sudo with podman;
* docker in Fedora has a really old version, and probably will be
depercated at some point.
Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
These module builds will basically act as metadata-only module builds.
This will be more useful as additional features stem from these types
of builds.