Do not wait for new CA certificate to appear in LDAP in ipa-certupdate

If new certificate is not available, reuse the old one, instead of waiting
indefinitely for the new certificate to appear.

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

Reviewed-By: David Kupka <dkupka@redhat.com>
Add bind-dyndb-ldap working dir to IPA specfile

https://fedorahosted.org/freeipa/ticket/4657#comment:6

Reviewed-By: Petr Spacek <pspacek@redhat.com>
tests: Use PEP8-compliant setup/teardown method names

The setUp/dearDown names are used in the unittest module, but there is no reason
to use them in non-`unittest` test cases.
Nose supports both styles (but mixing them can cause trouble when
calling super()'s methods).
Pytest only supports the new ones.

https://fedorahosted.org/freeipa/ticket/4610
tests: Add configuration for pytest

By default, pytest considers test classes only if they're named
'Test*'; Nose also allows 'test_*'.
Configure pytest to allow the non-pep8 names as well.

https://fedorahosted.org/freeipa/ticket/4610
ipatests.util.ClassChecker: Raise AttributeError in get_subcls

Pytest considers NotImplementedError on attribute access an error.

https://fedorahosted.org/freeipa/ticket/4610
test_automount_plugin: Fix test ordering

Nose ran the `test_a_*` and `test_a2_*` tests in opposite order
than the source suggested. Fix this.

https://fedorahosted.org/freeipa/ticket/4610
Use setup_class/teardown_class in Declarative tests

Pytest will consider each Declarative test individually, running
setup/teardown for each one.
Move the setup and teardown to the class level.

https://fedorahosted.org/freeipa/ticket/4610
dogtag plugin: Don't use doctest syntax for non-doctest examples

https://fedorahosted.org/freeipa/ticket/4610
test_webui: Don't use __init__ for test classes

https://fedorahosted.org/freeipa/ticket/4610
test_ipapython: Use functions instead of classes in test generators

pytest's support for Nose-style test generators is not bulletproof;
use a real function to please it.

https://fedorahosted.org/freeipa/ticket/4610
Configure pytest to run doctests

The pytest.ini file needs to be in or above the directory py.test is called in.
When in IPA project root, this invocation will find ./ipatests/pytest.ini:
    py.test ipatests/
but these will not (they're equivalent):
    py.test .
    py.test
So pytest.ini must be in the project root.

However, setupttols can't include files outside package directories,
so we also need this file to be under ipatests/

Solve the problem by symlinking ./pytest.ini to ipatests/pytest.ini.

https://fedorahosted.org/freeipa/ticket/4610
Declarative tests: Move cleanup to setup_class/teardown_class

https://fedorahosted.org/freeipa/ticket/4610
Declarative tests: Switch to pytest

Provide a local pytest plugin to generate tests.

The Declarative tests can now only be run with pytest

https://fedorahosted.org/freeipa/ticket/4610
Integration tests: Port the ordering plugin to pytest

Ordered integration tests may now be run with pytest.

https://fedorahosted.org/freeipa/ticket/4610
Switch make-test to pytest

The unused capability to run on multiple Python versions is removed,
and needed arguments are now listed in pytest.ini,
leaving just a simple call to the actual test runner.

https://fedorahosted.org/freeipa/ticket/4610
Add local pytest plugin for --with-xunit and --logging-level

The --with-xunit option ihas the same behavior as in nosetests:
it's an alias for pytest's --junitxml=nosetests.py

The --logging-level option enables direct IPA logging to stdout.

https://fedorahosted.org/freeipa/ticket/4610
Switch ipa-run-tests to pytest

https://fedorahosted.org/freeipa/ticket/4610
Switch integration testing config to a fixture

The hack of storing the config on the class is left in;
it would be too much work for too little gain at this time.

https://fedorahosted.org/freeipa/ticket/4610
Integration tests: Port the BeakerLib plugin and log collection to pytest

Move the IPA-specific log collection out of the Beakerlib plugin.
Add the --logfile-dir option to tests and ipa-test-task, so that logs
can be collected even if BeakerLib is not used.

https://fedorahosted.org/freeipa/ticket/4610
test_integration: Adjust tests for pytest

- Customize install() instead of setup_class()
- Use pytest parametrization instead of test generators