#627 test_lib_py2only/test_tasks.py does not read the fake mount table
Closed: Fixed Opened by franzh.

In the tests/test_lib_py2only/test_tasks.py, it is supposed to use a fake mount table generated by get_fake_mounts_file(). However, it reads the real mount table in /proc/mounts, and result in test fail under special cases (for example in docker/container).


The line 83:
with patch('{0}.open'.format(name), return_value=fake_mounts_file_contents, create=True):
self.assertIn(scan_mounts('/dev'), [['/dev/shm', '/dev/pts', '/dev/mqueue', '/dev/hugepages', '/dev'],
['/dev/shm', '/dev/pts', '/dev/mqueue', '/dev/console', '/dev']])

The mock.patch is applied on test_task.open(), koji.tasks.open() is not patched.

PR #629

Commit 836f1ee7 fixes this issue

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.15

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/koji/issues/627

Please continue any further discussion there.

Metadata