Commit Graph

10306 Commits

Author SHA1 Message Date
Jan Barta
275e85d076 pylint: fix unneeded-not
Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
2016-09-22 16:52:57 +02:00
Jan Barta
36484e8672 pylint: fix simplifiable-if-statement warnings
fix inefficient if statements, enable pylint check

Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
2016-09-22 16:52:57 +02:00
Martin Basti
929086e099 Test: dont use global variable for iteration in test_cert_plugin
Iteration over global variable causes unwanted value changes outside
method

https://fedorahosted.org/freeipa/ticket/5755

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2016-09-22 15:22:56 +02:00
Oleg Fayans
47c808afa3 tests: Fixed code styling in caless tests to make pep8 happy
Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
9870c5804a tests: Reverted erroneous asserts in 4 tests
Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
7412f0cb20 tests: fixed certinstall method
Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
f1f94a7b9f tests: fixed super method invocation
Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
8be0906b04 tests: added verbose assert to test_service_disable_doesnt_revoke
Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
106f37c26f tests: Standardized replica_preparation in test_no_certs
Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
b8968d923c tests: Implemented check for domainlevel before installation verification
We only need to verify installation of replica under domain level 1, otherwise
replica is not installed but only a gpg file is prepared

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
43994e6697 tests: Fixed Usage of improper certs in ca-less tests
Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
804aae8196 tests: fixed expects of incorrect error messages
Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
b8cf212e8b tests: Replaced unused setUp method with install
setUp method does not get executed in recent versions of pytest
Replaced with the install method derived from the parent IntegrationTest class

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
dbf0d141c5 tests: Replaced hardcoded certutil with imported from paths
Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
bb4205b582 tests: Enabled negative testing for cleaning replication agreements
Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
9217bcc871 tests: Made unapply_fixes call optional at master uninstallation
Unapply fixes removes the temporary testing folder at ~/ipatests, which
contains some artifacts like root.pem that need to be persistent between tests
in the test_caless testsuite. There has to be the way to skip the deletion of
this testfolder

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
e0b67dfa7e tests: Updated master and replica installation methods to enable negative testing
Negative testing was enabled by introducing an optional raiseonerr parameter
with True by default to both master and replica installation methods
Also the methods were updated to support intractive installation

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
24f218f4eb tests: Added necessary xfails
A number of tests fail due to known issues. Added xfails to acknowledge them

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
d17d13d77a tests: Added necessary getkeytabs calls to fixtures
Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
759bbcdfcb tests: Removed outdated command options test
Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
a81d847204 tests: Applied correct teardown methods
Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
84db13f676 tests: Fixed incorrect assert in verify_installation
Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
fad6ec8256 tests: Adapted installation methods to utilize methods from tasks
Master and replica installation methods were made to utilize corresponding
methods from tasks.py for the sake of DRY

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
725d8d0cac tests: Removed call for install method from parent class
The IntegrationTest.install method installs the full topology while in ca-less
tests we need to check server installation, thus the nodes should not have
server or replica installed

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
48ca465a12 tests: Added teardown methods for server and replica installation
Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
c0e16aa3b9 tests: Create a method that cleans all ipa certs
Upon uninstallation IPA does not remove certs from the system, see
https://fedorahosted.org/freeipa/ticket/4639 for details. This causes
installation failures in several tests. The workaround is to manually remove
certs from all certificate databases used by IPA after each server
uninstallation

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
38ad864342 tests: Updated ipa server installation stdin text
The installator has changed the question sequence so the stdin used for
interactive server installation has to be changed accordingly

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
0c635686dd tests: Added generation of missing certs
test_ca_server_cert and test_unknown_ca required 2 more certs that were not
pre-generated

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
2f6ffa326a tests: Added basic constraints extension to the CA certs
The IPA installer refuses to accept certs signed with a CA-signature that does
not have basic constraints enabled (Described in RFC 5280)

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Oleg Fayans
bbac233b5e tests: Fixed method failures during second call for the method
When the same host is used for numerous server/replica
installations/uninstallations at some point the /etc/openldap/ldap.conf file
gets corruped which results in ldapsearch unaware of the default ldap_uri to
connect. The workaround would be to provide ldap hostname for each ldapsearch.

Attention: please unapply this fix once the original issue is resolved.

https://fedorahosted.org/freeipa/ticket/5880

Reviewed-By: David Kupka <dkupka@redhat.com>
2016-09-22 15:20:42 +02:00
Stanislav Laznicka
330a3ca931 Remove update_from_dict() method
update_from_dict() method is not used anywhere in the project,
it only makes the tests fail. Removed it and its tests.

https://fedorahosted.org/freeipa/ticket/6311

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2016-09-22 13:02:57 +02:00
Stanislav Laznicka
2e0afab5f2 Updated help/man information about hostname
The man page and help of ipa-client-install and ipa-replica-conncheck
had an outdated information about what is used as a hostname.

https://fedorahosted.org/freeipa/ticket/5754

Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
2016-09-22 10:28:45 +02:00
Lenka Doudova
a7c49e455e Tests: Remove usage of krb5 ccache from test_ipaserver/test_ldap
In test_ipaserver/test_ldap::test_ldap::test_GSSAPI a krb5 ccache is used to
connect to ldap. The test tries to locate this cache in /tmp/krb5cc_$UID file,
which is not there due to default settings in krb5.conf, and hence the whole
test is skipped. Fix the test to use keyring to connect instead of ccache in
/tmp.

https://fedorahosted.org/freeipa/ticket/6323

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-09-21 18:48:22 +02:00
Lenka Doudova
8a947e2fd0 Tests: Fix host attributes in ipa-join host test
Fixing discrepancies between returned and checked attributes in ipa-join host
test, that arose after recent changes in behavior.

https://fedorahosted.org/freeipa/ticket/6326

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-09-21 18:46:37 +02:00
Lenka Doudova
c0fcfb31ec Tests: Update host test with ipa-join
Updating path to ipa-join command to allow execution of
test_xmlrpc/test_host::TestHostFalsePwdChange::test_join_host.

https://fedorahosted.org/freeipa/ticket/6326

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-09-21 18:46:37 +02:00
Lenka Doudova
936a6a38b8 Tests: Add krb5kdc.service restart to integration trust tests
krb5kdc.service restart is necessary for proper running of integration trust
related tests.

https://fedorahosted.org/freeipa/ticket/6322

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-09-21 18:44:42 +02:00
Jan Cholasta
09a8f62d12 test_plugable: update the rest of test_init
In commit ed4c2d9252, changes to the Plugin
class were made, but the test was updated only partially.

Update the rest to fix the failing test.

https://fedorahosted.org/freeipa/ticket/6313

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-09-21 18:43:01 +02:00
Lenka Doudova
522766a565 Tests: Remove unnecessary attributes from base tracker
https://fedorahosted.org/freeipa/ticket/6128

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-09-21 18:41:04 +02:00
Lenka Doudova
a07c4bdd4f Tests: Remove --force options from tracker base class
Removing --force option from tracker base class so it would not be required to
be implemented in every specific tracker, even though it's not necessary.
Modifying existing trackers to reflect this change.

https://fedorahosted.org/freeipa/ticket/6124

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-09-21 18:39:56 +02:00
Lenka Doudova
361105a3d5 Tests: Remove SSSD restart from integration tests
SSSD restart has been mistakenly added to integration tests
(test_integration/tasks.py::uninstall_master). When system setup is correct,
this restart has no significance, moreover it makes tests fail, hence its
removal is necessary.

https://fedorahosted.org/freeipa/ticket/6338

Reviewed-By: Oleg Fayans <ofayans@redhat.com>
2016-09-21 14:41:09 +02:00
Abhijeet Kasurde
8149b762b4 Added a fix for setting Priority as required field in Password Policy Details facet
Fixes: https://fedorahosted.org/freeipa/ticket/6335

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
2016-09-21 13:39:51 +02:00
Pavel Vomacka
0e6d6e4032 WebUI: Change group name from 'normal' to 'Non-POSIX'
It will correspond with CLI and will be more self-explanatory.

https://fedorahosted.org/freeipa/ticket/6334

Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
2016-09-21 13:20:21 +02:00
Tomas Krizek
4e880f7ce9 Update ipa-server-install man page for hostname
Hostname is always set, remove the text that says
hostname is set only if it does not match the current
hostname.

https://fedorahosted.org/freeipa/ticket/6330

Reviewed-By: Abhijeet Kasurde <akasurde@redhat.com>
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
2016-09-21 13:12:17 +02:00
Tomas Krizek
75f77e0f2a Add help info about certificate revocation reasons
Inform the user where to find additional information
about certificate revocation reasons.

https://fedorahosted.org/freeipa/ticket/6327

Reviewed-By: Abhijeet Kasurde <akasurde@redhat.com>
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
2016-09-21 13:05:13 +02:00
Tomas Krizek
d6f6a291da Add log messages for IP checks during client install
The added log messages allow easier debugging of
IP related issues during ipa-client-install.

https://fedorahosted.org/freeipa/ticket/6331

Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Reviewed-By: Abhijeet Kasurde <akasurde@redhat.com>
2016-09-21 10:36:31 +02:00
Tomas Krizek
ddf48f2fef Show error message for invalid IPs in client install
Re-raise the thrown exception to get an error message
instead of a traceback during ipa-client-install with
invalid IP address.

https://fedorahosted.org/freeipa/ticket/6340

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
2016-09-21 10:26:24 +02:00
Martin Basti
8f8e3d008f Use constant for user and group patterns
User and groups regexp are the same and constant should be used to avoid
any future misconfigurations.

https://fedorahosted.org/freeipa/ticket/5822

Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2016-09-20 17:35:28 +02:00
Martin Basti
3720080611 Fix regexp patterns in parameters to not enforce length
Regexp should not enforce lenght of string, we have different checks for
that. Secondly regexp with length specified produces an incorrect error
message.

https://fedorahosted.org/freeipa/ticket/5822

Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2016-09-20 17:35:28 +02:00
Tomas Krizek
2bc70a5d5f Keep NSS trust flags of existing certificates
Backup and restore trust flags of existing certificates during CA
installation. This prevents marking a previously trusted certificate
as untrusted, as was the case when CA-less was converted to CA-full
with external CA when using the same certificate.

https://fedorahosted.org/freeipa/ticket/5791

Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
2016-09-19 17:57:05 +02:00
Jan Cholasta
e5f7a612fb dns: re-introduce --raw in dnsrecord-del
The flag was removed in commit ff52c25ae2
because it is unused. Add it back for compatibility with old clients.

https://fedorahosted.org/freeipa/ticket/5644

Reviewed-By: Martin Basti <mbasti@redhat.com>
2016-09-19 17:36:20 +02:00