Fuel Client unit tests fail on OS X

Bug #1494196 reported by Roman Prykhodchenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Bulat Gaifullin
7.0.x
Won't Fix
Undecided
Unassigned

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.

Changed in fuel:
status: New → Confirmed
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Bulat Gaifullin (bgaifullin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-fuelclient (master)

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

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-fuelclient (master)

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)
tags: added: tech-debt
Dmitry Pyzhov (dpyzhov)
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.