Fuel Client unit tests fail on OS X

Bug #1494196 reported by Roman Prykhodchenko on 2015-09-10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Bulat Gaifullin

Bug Description

test_sync_with_directory_path in fuelclient/tests/unit/v1/test_deployment_tasks_actions.py fails with this error:

_mock_self = <MagicMock name='iterfiles' id='4451740240'>, args = ('/etc/puppet', '*tasks.yaml'), kwargs = {}, self = <MagicMock name='iterfiles' id='4451740240'>
msg = "Expected call: iterfiles('/etc/puppet', '*tasks.yaml')\nActual call: iterfiles('/private/etc/puppet', '*tasks.yaml')"

    def assert_called_with(_mock_self, *args, **kwargs):
        """assert that the mock was called with the specified arguments.

            Raises an AssertionError if the args and keyword args passed in are
            different to the last call to the mock."""
        self = _mock_self
        if self.call_args is None:
            expected = self._format_mock_call_signature(args, kwargs)
            raise AssertionError('Expected call: %s\nNot called' % (expected,))

        if self.call_args != (args, kwargs):
            msg = self._format_mock_failure_message(args, kwargs)
> raise AssertionError(msg)
E AssertionError: Expected call: iterfiles('/etc/puppet', '*tasks.yaml')
E Actual call: iterfiles('/private/etc/puppet', '*tasks.yaml')

Looks like some platform-depentent code is used somewhere.

Ivan Kliuk (ivankliuk) on 2015-09-10
Changed in fuel:
status: New → Confirmed
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Bulat Gaifullin (bgaifullin)

Fix proposed to branch: master
Review: https://review.openstack.org/225106

Changed in fuel:
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/225106
Committed: https://git.openstack.org/cgit/stackforge/python-fuelclient/commit/?id=6b26865728b95c85fdb83b1696bd71c75a8bbba6
Submitter: Jenkins
Branch: master

commit 6b26865728b95c85fdb83b1696bd71c75a8bbba6
Author: Bulat Gaifullin <email address hidden>
Date: Fri Sep 18 14:07:27 2015 +0300

    Fuel Client unit tests fail on OS X - fixed

    the platform specific method os.path.realpath is mocked.

    Closes-Bug: #1494196
    Change-Id: I8e11b7fc946b711a83aae1776a749fe6180de377

Changed in fuel:
status: In Progress → Fix Committed
Dmitry Pyzhov (dpyzhov) on 2015-10-06
tags: added: tech-debt
Dmitry Pyzhov (dpyzhov) on 2015-10-22
tags: added: area-python
Changed in fuel:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers