74 Commits

Author SHA1 Message Date
Merlin Mathesius
5b6252b194 Fix $PATH when running tests using podman
Signed-off-by: Merlin Mathesius <mmathesi@redhat.com>
2020-02-17 14:27:52 -06:00
Mike McLean
5dc089e83c option to use Podman instead of Docker when running unit tests 2019-11-13 15:25:16 -05:00
Mike McLean
1b02a45331 no need to update database image 2019-10-17 11:06:20 -04:00
Mike McLean
0d8af77ce4 run-unittests.sh: docker pull needed images
Related: https://pagure.io/fm-orchestrator/issue/1463
2019-10-15 11:14:10 -04:00
mprahl
2fc439c860 Allow running an individual test using a relative path
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.
2019-09-18 16:01:05 -04:00
Mike McLean
dfc88f99a6 option to use sudo when running docker for unit tests 2019-09-18 11:04:46 -04:00
mprahl
cf334b3261 Use a different container name when running the unit tests with Postgres
This will allow the parallel execution of tests that use SQLite and Postgres.
2019-08-23 12:06:48 -04:00
mprahl
14a9ef9974 Use the z option when mounting container volumes to allow sharing 2019-08-23 11:53:16 -04:00
Chenxiong Qi
bd0a2bbdc2 Give a unique name to postgres database container
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-07-16 09:51:02 +08:00
Chenxiong Qi
5baaeb2fc7 Give a unique name to container running tests inside
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-07-16 09:44:32 +08:00
Chenxiong Qi
60b0e8da5c Wait for Postgres to be running before starting the unit tests
Fixes #1314

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-07-02 20:54:26 +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
ee2036cd10 Add option --no-tty to run-unittests.sh
This is useful for running run-unittests.sh in Jenkins. When set --no-tty, -i
and -t are not added to docker-run command.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-06-18 22:48:15 +08: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
2c0f6b2f94 Fix the integration scripts when using the latest rpkg code 2018-04-05 15:46:49 -04:00
mprahl
a4903876f2 Remove deprecated mbs-build tool 2018-04-03 10:09:29 -04:00
mprahl
68afd52fd3 Add additional checks in test-mbs-fedora-staging-resume.sh 2018-01-23 10:56:54 -05:00
mprahl
7bb8a8ad50 Print a deprecation error when a user tries to use mbs-build 2017-11-27 10:53:14 -05:00
Martin Curlej
a1fd9daa73 Moved skiptests cli option 2017-11-21 09:07:32 +01:00
mprahl
c5bc034178 Add an integration test to make sure module builds fail when a component fails 2017-11-17 19:17:42 -05:00
mprahl
c25f8c4956 Don't fail the test script when the module is in the "done" state 2017-11-14 14:22:54 -05:00
Ralph Bean
42fc027b46 Consolidate sanity check. 2017-11-10 14:32:42 -05:00
Ralph Bean
a212097fe8 Fix docstrings. 2017-11-10 14:32:28 -05:00
Martin Curlej
11a51a0404 mbs-buil local now builds only from yaml files 2017-11-10 12:33:42 -05:00
Martin Curlej
03cff80e4a Streamlined cmd line options for local builds
Signed-off-by: Martin Curlej <mcurlej@redhat.com>
2017-11-10 12:33:42 -05:00
Ralph Bean
8520cabe4e A less brittle staging test.
Establish a baseline before trying to detect re-use.
2017-11-07 09:25:59 -05:00
Ralph Bean
4200579835 Add a second test script. 2017-11-03 15:56:53 -04:00
Ralph Bean
960ff1c4f3 Add a script to test MBS in fedora-stg.
It does a little exercise... and it works!  Used today to test
mbs-1.4.1.  We can probably expand on this later to add other tests as
we like.
2017-11-03 09:26:20 -04:00
Ralph Bean
51d6b14cf6 Be careful in the event that there are no rpms associated with a module. 2017-09-21 12:11:17 -04:00
mprahl
97ac3de347 Support Kerberos authentication in mbs-build 2017-09-19 16:48:28 -04:00
mprahl
5d9a16e8f0 Support insecure mode on "mbs-build overview" and supress warnings from doing so 2017-09-19 16:48:28 -04:00
Jan Kaluza
8ca03a859f Add trailing slash to DEFAULT_MBS_REST_API to not send requests which results in redirect 2017-08-17 14:52:56 +02:00
Jan Kaluža
77ac0db625 Merge #644 Add 'mbs-build local [[--add-local-build n:s:v], ...]' to use local builds as dependency. 2017-08-17 08:07:43 +00:00
Jan Kaluza
aac4227eb8 Add 'mbs-build local [[--add-local-build n:s:v], ...]' to use local builds as dependency. 2017-08-17 10:00:19 +02:00
Filip Valder
0d9699d40a Fix typo 2017-08-16 09:57:44 +02:00
Filip Valder
a5ab1de042 Fix #637 2017-08-15 08:41:50 +02:00
Filip Valder
21810d1808 Fix for optional arguments in arg=value format. TypeError: 'NoneType' object is not iterable fixed. 2017-08-15 08:40:38 +02:00
Filip Valder
60eac3605b Move Koji/MBS URLs to the top and reference them as constants. 2017-08-15 08:39:16 +02:00
Filip Valder
13bcb05d98 Fix #617: mbs-build shows python error 2017-08-08 09:13:25 +02:00
Filip Valder
77dc96ce7b fix PEP8 2017-08-07 14:14:10 +02:00
Filip Valder
e3a002f0ff use print rather than logging.info (similarly to watch_build) 2017-08-07 14:14:10 +02:00
Filip Valder
d93f98caba Fix #618: mbs-build prints json instead of message 2017-08-07 14:14:03 +02:00
Filip Valder
ddc57d08eb Merge #624 Fix #620: Support for log flags in mbs-manager and mbs-build 2017-08-07 10:44:54 +00:00
Filip Valder
31b0e525c4 Fix #620: Support for log flags in mbs-manager and mbs-build 2017-08-04 15:27:23 +02:00
Jakub Kadlcik
a707c227ad Allow to specify optional parameters 2017-08-01 13:42:54 +02:00
Filip Valder
5391e7c9af add --skiptests option to mbs-build and manage.py build_module_locally 2017-06-09 15:20:30 +02:00
Nils Philippsen
92ee66e107 mbs-build: only sleep 30s if not done yet 2017-05-17 11:52:03 +02:00
Nils Philippsen
244f9960a6 mbs-build: print koji tag if present 2017-05-17 11:52:03 +02:00
Jakub Kadlčík
03c360a2ea Add --insecure option just like curl has 2017-05-16 14:07:07 +02:00
Jakub Kadlčík
73fad00f57 Use urljoin to eliminate double-slashes 2017-05-16 13:44:02 +02:00