Some unit tests don't work on MacOS

Bug #1635884 reported by Ivan Kolodyazhny
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Ivan Kolodyazhny

Bug Description

os.fdatasync doesn't exist on MacOS, so we need to skip tests using it
cinder.tests.unit.targets.test_cxt_driver.TestCxtAdmDriver.test_create_iscsi_target_already_exists
--------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/Users/e0ne/src/openstack/cinder-group/cinder/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
        return func(*args, **keywargs)
      File "cinder/tests/unit/targets/test_cxt_driver.py", line 134, in test_create_iscsi_target_already_exists
        portals_ips=[self.configuration.iscsi_ip_address]))
      File "cinder/volume/targets/cxt.py", line 133, in create_iscsi_target
        utils.robust_file_write(volumes_dir, vol_id, volume_conf)
      File "cinder/utils.py", line 404, in robust_file_write
        os.fdatasync(tf.fileno())
    AttributeError: 'module' object has no attribute 'fdatasync'

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
assignee: nobody → Ivan Kolodyazhny (e0ne)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/390025
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=f1f90c8084f4dde44274d63390ddcd911dd90da0
Submitter: Jenkins
Branch: master

commit f1f90c8084f4dde44274d63390ddcd911dd90da0
Author: Ivan Kolodyazhny <email address hidden>
Date: Sat Oct 22 23:55:58 2016 +0300

    Skip unit-tests which use os.fdatasync on MacOS

    MacOS doesn't have os.fdatasync so we have to skipp tests which use it.

    Change-Id: I9a93de3069b097868ab722af9a7f08d4e0d77a53
    Closes-Bug: #1635884

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 10.0.0.0b1

This issue was fixed in the openstack/cinder 10.0.0.0b1 development milestone.

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.