7c03708 ipatests: Provide a context manager for mocking a trust in RPC tests

1 file Authored by mkubik 7 years ago, Committed by mbasti 7 years ago,
    ipatests: Provide a context manager for mocking a trust in RPC tests
    
    The new module contains utility functions and a context manager to
    make the mocking of an existing AD trust relation in the XMLRPC tests.
    
    The module provides with two functions that create and delete the
    containers for trusts and cifs domains. A context manager using these
    is provided as well.
    
    The user of the context manager is responsible for deleting all the
    LDAP entries created during the test within the context. If there are
    some entries left at the time of exiting the context manager, making
    the container entries non-leaf entries, the tests will fail.
    
    The context manager will not work when used on a server that already
    has trust established.
    
    https://fedorahosted.org/freeipa/ticket/6142
    
    Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>