20 Commits

Author SHA1 Message Date
Brendan Reilly
74bb78068f Pull Fedora container from Fedora registry
We need to pull the image from here to avoid rate limiting from
dockerhub
2021-03-23 15:56:37 -04:00
Martin Curlej
013388cc62 Changed the docker fedora tag to latest.
It was set to fedora:31 which does not receives any updates now.
This will enable testing of new versions of libraries as libmodulemd
for example.

Signed-off-by: Martin Curlej <mcurlej@redhat.com>
2021-01-06 14:56:50 +01:00
Chenxiong Qi
b5bcc981f9 Add celery app instance with base config
This patch allows to schedule tasks and launch workers with basic
config. To launch a worker:

    celery -A module_build_service.celery_app -l info

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2020-03-03 14:48:47 -05:00
Chenxiong Qi
87f4f3e546 Use distro.linux_distribution instead
platform.linux_distribution is removed since Python 3.8.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-11-18 10:41:41 +08:00
Mike Bonnet
86c85825ee update container base images to Fedora 31
Also update the uid management in the frontend image to be more consistent with
best practices, as demonstrated by:

https://github.com/RHsyseng/container-rhel-examples/tree/master/starter-arbitrary-uid

This allows the dependency on nss_wrapper to be dropped.
2019-11-01 12:04:36 -07:00
mprahl
f8e4daae9f Unpin the libmodulemd RPMs 2019-09-13 08:32:24 -04:00
Chenxiong Qi
5d0969f312 Merge #1406 Show test coverage 2019-09-12 01:50:20 +00:00
mprahl
00e78494d9 Refactor handling of default buildroot modules (Ursa Prime)
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
2019-09-11 12:20:35 -04:00
Chenxiong Qi
dd1f918920 Show test coverage
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-09-10 23:02:36 +08:00
Chenxiong Qi
e3b14beacc Allow to run tests in containers in parallel
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-08-07 21:45:07 +08:00
Chenxiong Qi
5f93a47051 Allow to run specific test inside container
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>
2019-06-21 10:48:10 -04:00
Chenxiong Qi
630f7b4e18 Allow to run tests with PostgreSQL inside container
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>
2019-06-17 22:47:23 +08:00
mprahl
c1e2a5b0af Unpin the libmodulemd RPMs 2019-05-16 11:51:38 +00:00
mprahl
14098cea08 Migrate to libmodulemd v2
This also moves the methods load_mmd and load_mmd_file to
module_build_service.utils.general.

This also removes some MSE unit tests with a mix of positive and
negative streams since this is not supported in libmodulemd v2. The
user will be presented with a syntax error if they try to submit
such a modulemd file.
2019-05-13 13:40:37 -04:00
mprahl
321bb4940f Unpin the libsolv version for the Python 3 tests since it's in stable 2019-04-04 13:45:14 +00:00
mprahl
24d2be565b Pin the version of libsolv in FEDORA-2019-c381c7bf54 for the tests 2019-04-03 15:24:43 -04:00
mprahl
bc2a1e8d3c Fix the unit tests 2019-04-03 14:40:52 -04:00
Jan Kaluza
7052ea0a11 Make init handler idempotent.
This fixes the issue when module build is cancelled in init state.
2019-02-14 14:18:54 +01:00
Filip Valder
38c0ea6147 Basic monitoring w/-o MBS-specific metrics 2019-02-12 16:08:41 +00:00
Mike Bonnet
0b3d7809f9 test pull requests under Python 3 as well 2019-02-08 17:43:43 +00:00