summaryrefslogtreecommitdiffstats
path: root/ipatests/test_integration/tasks.py
Commit message (Collapse)AuthorAgeFilesLines
* ipatests: Setup SSSD debugging mode by defaultTomas Babej2014-05-091-0/+28
| | | | | Reviewed-By: Jakub Hrozek <jhrozek@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
* ipatests: Add Sudo integration testTomas Babej2014-05-091-1/+1
| | | | | Reviewed-By: Jakub Hrozek <jhrozek@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
* ipatests: tasks: Accept extra arguments when installing clientTomas Babej2014-04-171-2/+3
| | | | Reviewed-By: Petr Viktorin <pviktori@redhat.com>
* ipatests: Fix apache semaphores prior to installing IPA serverTomas Babej2014-04-171-0/+14
| | | | Reviewed-By: Petr Viktorin <pviktori@redhat.com>
* ipatests: tasks: Wait 2 seconds after restart of SSSD when clearing the cacheTomas Babej2014-04-041-0/+3
| | | | Reviewed-By: Petr Viktorin <pviktori@redhat.com>
* ipatests: Make sure that remnants of PKI are removedTomas Babej2014-04-041-0/+9
| | | | Reviewed-By: Petr Viktorin <pviktori@redhat.com>
* test_integration.tasks: Do not fail cleanup if backup directory does not existPetr Viktorin2014-03-201-1/+2
| | | | | | | | | If the test backup directory was never created (for example if there was an early failure, or install was never run), we don't want the test to fail. Do not restore if the backup dir is not there. Reviewed-By: Martin Kosek <mkosek@redhat.com>
* ipatests: Fix incorrect order of operations when restoring backupTomas Babej2014-02-251-1/+1
| | | | | | | | | | When restoring files from backup, we do use an incorrect order of operations - we first restore SELinux context and then copy the files from backup, when we need to do the exact opposite. https://fedorahosted.org/freeipa/ticket/4133 Reviewed-By: Jan Pazdziora <jpazdziora@redhat.com>
* ipatests: Stop sssd service before deleting the cacheTomas Babej2014-02-101-2/+2
| | | | | | | | In the integration tests, we do not stop the sssd service before deleting the cache, but rather start it. We need to stop sssd before deleting the cache. Reviewed-By: Nathaniel McCallum <npmccallum@redhat.com>
* ipatests: Perform a connection test before preparing the clientTomas Babej2014-02-101-0/+4
| | | | | | | | | | | | When the host is down, the preparation of the host fails. This produces misleading errors, since the test framework reports that the actual command being executed failed, when in fact (in case of SSHTransport), the cause of failure was unability to establish a SSH session. https://fedorahosted.org/freeipa/ticket/4132 Reviewed-By: Nathaniel McCallum <npmccallum@redhat.com>
* ipatests: Run restoring backup files and restoring their context in one sessionTomas Babej2014-02-051-10/+14
| | | | | | | | | | | | | | Restoring backup files and restoring their context were two separate commands, what means that in case we use SSHTrasport, which creates a separate SSH session for each command, we try to restore the SELinux context of the changed files in a new session. This causes problems, if the access to files themselves are necessary for the creation of the new SSH session. https://fedorahosted.org/freeipa/ticket/4133 Reviewed-By: Petr Viktorin <pviktori@redhat.com>
* ipatests: Add records for all hosts in master's domainTomas Babej2014-02-051-0/+28
| | | | | | | | | | | | | | All the hosts in the domain have IPA master set as their only nameserver. However, the IPA master does not create records for these machines by default. This is not an big issue for clients or replicas, since those records do get created in other ways, but external hosts using their internal hostnames will not resolve. Adds an A record for each host in master's domain. https://fedorahosted.org/freeipa/ticket/4130 Reviewed-By: Petr Viktorin <pviktori@redhat.com>
* ipatests: Remove sudo calls from tasksTomas Babej2014-01-201-2/+2
| | | | | | | | Sudo calls are not necessary since we log in as a root. Additionally, sudo requires tty in default configuration, which is not acquired when using OpenSSH transport. https://fedorahosted.org/freeipa/ticket/4125
* Turn LDAPEntry.single_value into a dictionary-like property.Jan Cholasta2013-11-051-2/+2
| | | | | | This change makes single_value consistent with the raw property. https://fedorahosted.org/freeipa/ticket/3521
* Fix debug output in integration testPetr Viktorin2013-11-041-1/+1
| | | | | | Recent ipaldap work has made LDAPEntry incompatible with python-ldap's LDIFWriter. Convert entry to dict before printing debug output.
* ipatests: Add support for extra roles referenced by a keywordTomas Babej2013-10-311-4/+6
| | | | | | | | | | | | | | | | | | Adds support for host definition by a environment variables of the following form: ROLE_<keyword>_envX, where X is the number of the environment for which host referenced by a role <keyword> should be defined. Adds a required_extra_roles attribute to the IntegrationTest class, which can test developer use to specify the extra roles that this particular test requires. If not all required extra roles are available, the test will be skipped. All extra (and static) roles are accessible to the IntegrationTests via the host_by_role method, which returns a host of given role. Part of: https://fedorahosted.org/freeipa/ticket/3833
* ipatests: Restore SELinux context after restoring files from backupTomas Babej2013-10-311-0/+12
| | | | Part of: https://fedorahosted.org/freeipa/ticket/3833
* ipatests: Extend clear_sssd_cache to support non-systemd platformsTomas Babej2013-10-311-6/+16
| | | | Part of: https://fedorahosted.org/freeipa/ticket/3833
* ipatests: Add AD-integration related tasksTomas Babej2013-10-241-0/+180
| | | | Part of: https://fedorahosted.org/freeipa/ticket/3834
* test_simple_replication: Fix waiting for replicationPetr Viktorin2013-10-181-2/+1
| | | | | | | | | | | The integration tests must wait for replication to happen before checking results. In some cases, the tests have failed because the checks that detect completed replication were insufficient. This fixes the code to: - Wait for replication to be completed on both servers - In the case of an error, continue waiting -- it might be the case that the DS is temporarily unreachable
* test_integration.host: Move transport-related functionality to a new modulePetr Viktorin2013-10-031-4/+4
| | | | | | | | | | | | | | | This will make it possible to use a different mechanism for cases like - Paramiko is not available - Hosts without SSH servers (e.g. Windows) Add BaseHost, Transport & Command base classes that define the interface and common functionality, and Host, ParamikoTransport & SSHCommand with specific details. The {get,put}_file_contents methods are left on Host for convenience; all other Transport methods must be now accessed through the transport. Part of the work for https://fedorahosted.org/freeipa/ticket/3890
* test_simple_replication: Wait for replication to finish before checkingPetr Viktorin2013-07-251-0/+50
| | | | | | | Add ldap_connect() method to Host to allow executing querying LDAP from tests. Use information in the mapping tree to poll until all replication is finished (or failing) before checking that entries replicated successfully.
* Add install_topo to test tasksPetr Viktorin2013-07-251-0/+145
| | | | | | | This allows a cluster of replicas and clients to be installed in a named topology. Several named topologies are available (star, line, complete, tree, tree2) and new ones can be defined as a simple function.
* Add more test tasksPetr Viktorin2013-07-251-10/+40
| | | | | | | | - install_client - connect_replica - disconnect_replica - prepare_host - kinit_admin
* test_integration: Set up CA on replicas by defaultPetr Viktorin2013-07-251-6/+11
| | | | | For complex topologies the CA needs to be available on most replicas, since only servgers with a CA can prepare replica files.
* test_integration: Add log collection to HostPetr Viktorin2013-07-251-17/+13
| | | | This allows collecting logs when a test context is not available.
* Make BeakerLib logging less verbosePetr Viktorin2013-07-151-3/+3
| | | | | | | | | | | | | Logs from Beaker jobs are normally very brief, with the standard output/error containing detailed information. Make ipa-run-tests with BeakerLib plugin follow this convention. Only include INFO and higher level messages in the Beaker logs. Downgrade several message levels to DEBUG. Log to console using Python logging instead of showing the Beaker logs. Since ipa-run-tests sets up its own logging, Nose's own log handling just causes duplicate messages. Disable it with --nologcapture.
* Host class improvementsPetr Viktorin2013-07-151-0/+5
| | | | | | | | | | - Use the external hostname when connecting to remote hosts - Make it possible to specify working directory for remote commands - Move kinit calls to installation code This allows tests where installation is done later - Log at error level when a remote command fails unexpectedly - Clean up test directory before testing - Break infinite recursion in mkdir_recursive if dir can't be created
* tests: Configure/unconfigure remote hostsPetr Viktorin2013-07-151-0/+110
| | | | | | | | Set up the hostname, /etc/resolv.conf, and /etc/hosts on remote hosts in the test setup. Undo the changes in test teardown. Part of the work for https://fedorahosted.org/freeipa/ticket/3621
* Add a framework for integration testingPetr Viktorin2013-07-151-0/+90
Add methods to run commands and copy files to Host objects. Adds a base class for integration tests which can currently install and uninstall IPA in a "star" topology with per-test specified number of hosts. A simple test for user replication between two masters is provided. Log files from the remote hosts can be marked for collection, but the actual collection is left to a Nose plugin. Part of the work for: https://fedorahosted.org/freeipa/ticket/3621