test_brick_lvm unit test issue

Bug #1676646 reported by Eric Harney on 2017-03-27
This bug affects 1 person
Affects Status Importance Assigned to Milestone
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)

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

Changed in cinder:
status: New → In Progress

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

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

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers