Commit Graph

21 Commits

Author SHA1 Message Date
Stanislav Levin
54a0e9e96d Add jslint check to PR CI tests
For now, from all possible lint checks, pylint applies only.
jslint can prevent JavaScript errors at WebUI.

Fixes: https://pagure.io/freeipa/issue/7717
Fixes: https://pagure.io/freeipa/issue/7718
Reviewed-By: Christian Heimes <cheimes@redhat.com>
2018-09-27 16:33:25 +02:00
Christian Heimes
21f14e9893 Remove Python 2 support and packages
Remove Python 2 related code and configuration from spec file, autoconf
and CI infrastructure. From now on, FreeIPA 4.8 requires at least Python
3.6. Python 2 packages like python2-ipaserver or python2-ipaclient are
no longer available. PR-CI, lint, and tox aren't testing Python 2
compatibility either.

See: https://fedoraproject.org/wiki/Changes/FreeIPA_Python_2_Removal
Fixes: https://pagure.io/freeipa/issue/7568
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Tibor Dudlak <tdudlak@redhat.com>
2018-09-06 17:39:00 +02:00
Stanislav Levin
f49fac7bda Add tests for "i18n_messages" end point
Fixes: https://pagure.io/freeipa/issue/7559
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
2018-07-17 15:32:28 -04:00
Christian Heimes
904458a493 Update builddep command in BUILD.txt
It's no longer necessary to specify "with_python3" to get Python 3
dependencies.

python3-tox pulls in Python 2.6, 3.3, 3.4, 3.5, and pypy as weak
dependency. Use --setopt=install_weak_deps=False to make a build
environment leaner.

Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2018-07-17 16:52:31 +02:00
Alexey Slaykovsky
c450e2dc8f Make WebUI unit tests to generate results as JUnit
Now WebUI unit tests are generating results in qunit format which
is not consumable well by Jenkins.

This patch adds NPM dependency for adding generation results in
JUnit XML format so it can be easily processed.

Reviewed-By: Christian Heimes <cheimes@redhat.com>
2018-03-16 14:26:48 +01:00
Christian Heimes
c5fb6c8502 Prepare migration of mod_nss NSSDB to sql format
- Refactor CertDB to look up values from its NSSDatabase.
- Add run_modutil() helpers to support sql format. modutil does not
  auto-detect the NSSDB format.
- Add migration helpers to CertDB.
- Add explicit DB format to NSSCertificateDatabase stanza
- Restore SELinux context when migrating NSSDB.
- Add some debugging and sanity checks to httpinstance.

The actual database format is still dbm. Certmonger on Fedora 27 does
neither auto-detect DB format nor support SQL out of the box.

https://pagure.io/freeipa/issue/7354

Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
2018-02-23 11:04:10 +01:00
Christian Heimes
0cc2a6cae0 Fix multiple uninstallation of server
"ipa-server-install --uninstall" no longer fails with error message
"'Env' object has no attribute 'basedn'" when executed on a system that
has no freeIPA server installation.

Fixes: https://pagure.io/freeipa/issue/7063
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Felipe Volpone <fbarreto@redhat.com>
2018-02-15 14:02:03 +01:00
Pavel Vomacka
e89163d491 Edit TravisCI conf files to run WebUI unit tests
Related: https://pagure.io/freeipa/issue/7278
Reviewed-By: Christian Heimes <cheimes@redhat.com>
2017-12-14 18:57:37 +01:00
Alexander Bokovoy
868c7e7c91 travis-ci: collect logs from cmocka tests
When 'make check' is run, automake produces logs for each test to be ran.
Collect all the logs from the tests.

Also prepare the template to quickly enable use of gdb with traceback
in case a test is crashing. To use it, add LOG_COMPILE definition to
the 'make' line.

Reviewed-By: Christian Heimes <cheimes@redhat.com>
2017-11-29 15:55:00 +02:00
Christian Heimes
9e640190ee
Run tox tests for PyPI packages on Travis
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
2017-11-20 17:01:59 +01:00
Stanislav Laznicka
a30095b3a6 travis: remove "fast" from "makecache fast"
dnf makecache does not support the "fast" keyword in its
makecache subcommand in Fedora 26.

https://pagure.io/freeipa/issue/6874

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2017-09-08 15:42:07 +02:00
Martin Basti
b43dab8388 Travis: check for BytesWarnings in httpd error_log
This check should prevent regressions in already py3 ported server plugins.
Later it may be extened to multiple logs.

Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
2017-06-22 13:43:44 +02:00
Martin Basti
cba678d846 travis: fix pylint execution with py3
Python version was placed at wrong position, py3 hasn't been tested at
all in travis.

https://pagure.io/freeipa/issue/4985

Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
2017-05-29 14:44:29 +02:00
Martin Babinsky
89a5bb2c6b Travis CI: Add the server uninstaller as a last step of tests
The explicit uninstall will help to catch regressions
such as recently reported https://pagure.io/freeipa/issue/6950

Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
2017-05-17 12:28:14 +02:00
Martin Babinsky
b6624594be
Travis CI: invoke integration test helper scripts before test execution
This is to verify that all the executables are working properly (have
correct import paths etc.)

Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
2017-03-22 14:18:51 +01:00
Jan Cholasta
fe4489ede2 Travis CI: run tests in development mode
Set `mode` to `development` in default.conf after ipa-server-install.

https://pagure.io/freeipa/issue/6625

Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
2017-03-13 16:06:22 +01:00
Martin Basti
4006cbbc02 KRA: add --setup-kra to ipa-server-install
This patch allows to install KRA on first IPA server in one step using
ipa-server-install

This option improves containers installation where ipa-server can be
installed with KRA using one call without need to call docker exec.

Please note the the original `kra.install()` calls in
ipaserver/install/server/install.py were empty operations as it did
nothing, so it is safe to move them out from CA block

https://pagure.io/freeipa/issue/6731

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
2017-03-08 15:50:30 +01:00
Martin Babinsky
91341f4035 Travis CI: Upload the logs from failed jobs to transfer.sh
When a non-lint job fails, all the relevant logs from the test runner
will be gzipped and uploaded to https://transfer.sh file sharing
service. The download link will then be displayed at the very end of the
Travis build log.

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
2017-02-09 13:26:07 +01:00
Martin Basti
d648c6a692 py3: enable py3 pylint
We should run pylint in both python2 and python3 versions

Reviewed-By: Christian Heimes <cheimes@redhat.com>
2017-01-11 13:17:15 +01:00
Martin Babinsky
4abd3f554a Add license headers to the files used by Travis CI
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
2017-01-05 16:21:51 +01:00
Martin Babinsky
5ecaea6bc4 Configuration file for ipa-docker-test-runner
Prepare a configuration file for
https://github.com/martbab/ipa-docker-test-runner. The latest
freeipa-fedora-test-runner Docker image (F25 as of time of writing this
message) will be used to run tests. Some of them will be purposefuly excluded
from the test suite, namely:

* test_integration and test_webui: for obvious reasons, CI tests require
  complicated multi-host setup which is currently not achievable in Travis CI
* test_ipapython/test_keyring: Docker can not cope with storing and retrieving
  secrets from Kernel keyring, that is a known issue
* test_xmlrpc/test_dns_plugin.py:test_dns_soa: There are 2-3 non-deterministic
  failures in this suite in Travis CI, this suite was disabled until the root
  cause is discovered and fixed/workarounded

Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
2016-12-07 10:32:44 +01:00