freeipa/ipatests/test_ipaserver/test_install
Stanislav Levin 19462788f1 ipatests: Properly kill gpg-agent
There is a race condition exposed in 'test_gpg_asymmetric'.
The teardown of 'tempdir' fixture and gpg-agent being called
from the teardown of 'gpgkey' fixture could simultaneously
remove the gnugpg's socket files.

This results in an error like:
```

================= ERRORS ===================
_ ERROR at teardown of test_gpg_asymmetric __
...

>  os.unlink(entry.name, dir_fd=topfd)
E  FileNotFoundError: [Errno 2] No such file or directory: 'S.gpg-agent.extra'

/usr/lib64/python3.7/shutil.py:450: FileNotFoundError

```

The problem is that the agent is not terminated properly.
Instead, gpgconf could be used to kill daemonized gpg-agent.

Related: https://pagure.io/freeipa/issue/7989
Signed-off-by: Stanislav Levin <slev@altlinux.org>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
2020-02-12 18:08:32 +02:00
..
__init__.py Add options to run only ipaclient unittests 2017-03-17 15:02:13 +01:00
test_adtrustinstance.py Py3: Remove subclassing from object 2018-09-27 11:49:04 +02:00
test_bindinstance.py Add absolute_import future imports 2018-04-20 09:43:37 +02:00
test_installer.py pytest: Migrate xunit-style setups to Pytest fixtures 2020-02-12 18:08:32 +02:00
test_installutils.py ipatests: Properly kill gpg-agent 2020-02-12 18:08:32 +02:00
test_service.py Applied tier0 and tier1 marks on unit tests and xmlrpc tests 2015-11-09 11:49:17 +01:00