#5748 Fix test_external_ca tests
Closed: Fixed Opened by ofayans.

In relation to the latest changes in the way the test folder creation/deletion is handled in integration tests, some tests started to fail, for example test_external_ca:

test_integration/test_external_ca.py:49: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../pytest_multihost/host.py:246: in run_command
    command.wait(raiseonerr=raiseonerr)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_multihost.transport.SSHCommand object at 0x7ff5609eb610>
raiseonerr = True
    def wait(self, raiseonerr=True):
        """Wait for the remote process to exit
            Raises an excption if the exit code is not 0, unless raiseonerr is
            true.
            """
        if self._done:
            return self.returncode
        self._end_process()
        self._done = True
        if raiseonerr and self.returncode:
            self.log.error('Exit code: %s', self.returncode)
>           raise subprocess.CalledProcessError(self.returncode, self.argv)
E           CalledProcessError: Command 'date | sha256sum > /root/ipatests/noise.txt' returned non-zero exit status 1
../pytest_multihost/transport.py:159: CalledProcessError
---------------------------- Captured stdout setup -----------------------------
<ipatests.test_integration.config.Config object at 0x7ff560a51cd0>
========================== 1 failed in 32.25 seconds ===========================

It is necessary to either revert the changes or make this process more graceful.


ipa-4-3:

  • 69335a985dd48c7d47a9e968abd19836d2d075bb Reverted changes in mh fixture causing some tests to fail
  • df816e34ec8b945d014a45437bf83030a1e2b162 Fixed a bug with prepare_host failing upon existing ipatests folder

master:

  • 7289ad16cb9e33e118f146e1a798e5ed9176cde2 Reverted changes in mh fixture causing some tests to fail
  • 2fa09526031b770d6c16aacc76b476d1c3c2e3cb Fixed a bug with prepare_host failing upon existing ipatests folder

Metadata Update from @ofayans:
- Issue assigned to ofayans
- Issue set to the milestone: FreeIPA 4.3.1

Metadata