a6f0111 ipatests: fixture can produce IndexError

Authored and Committed by frenaud 11 months ago
    ipatests: fixture can produce IndexError
    The fixture issue_and_expire_acme_cert returns a function
    that fills the hosts array. If the function is not called in
    the test (for instance because a test is skipped, as in
    TestACMEPrune::test_prune_cert_search_size_limit), hosts = []
    and hosts[0] raises an IndexError.
    Fix the fixture to check first that hosts is not empty.
    Related: https://pagure.io/freeipa/issue/9348
    Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
    Reviewed-By: Mohammad Rizwan Yusuf <myusuf@redhat.com>