test_brick_lvm unit test issue

Bug #1676646 reported by Eric Harney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Kendall Nelson

Bug Description

BrickLvmTestCase.test_volume_create_after_thin_creation has a "def executor" method defined, but it doesn't seem to work. You can add anything to it, and unit tests will still pass.

Also, assigning directly to self.vg._executor is likely not safe.

Found while looking into this pylint error, which is still another issue:
["No value passed for parameter 'root_helper' in function call", "LOG.error('Current state: %s', self.get_all_volume_groups())"]

Changed in cinder:
assignee: nobody → Kendall Nelson (kjnelson)
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/486870

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

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

commit 438b3e8fc2af1882d1df21eaf94331c2b0836490
Author: Kendall Nelson <email address hidden>
Date: Mon Jul 24 22:15:01 2017 -0700

    Mock execute in unit test

    This patch fixes the test_volume_create_after_thin_creation test
    to mock execute instead of defining an execute method inside
    the test. Since the unit test is run twice with different options,
    the unit test asserts different things depending on the configuration
    of how the test is being run.

    Change-Id: Ia841ca55b36aa19d4d6b174239f4d4200793d4e5
    Closes-bug: 1676646

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

This issue was fixed in the openstack/cinder 11.0.0.0rc1 release candidate.

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.