34d72d1 ipatests: use pexpect to control inetractive session of ipa-adtrust-install

Authored and Committed by sorlov 3 years ago
    ipatests: use pexpect to control inetractive session of ipa-adtrust-install
    
    During interactive session of `ipa-adtrust-install` the user needs to
    answer several questions. This was done by sending all answers to
    the processes stdin without analyzing the questions.
    
    If the installation scenario changes at some point we can get on of the
    following results:
    * the test fails in the end and the root cause is not obvious
    * if a new question was added
    * test does not fail but answers are provided for wrong questions -
      in this case scope of test case changes without being noticed
    
    If we use `pexpect` for controlling the session, the test will fail
    immediately when it encounters unexpected question.
    
    Related to: https://pagure.io/freeipa/issue/8690
    
    Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>