From: Eric Harney Date: Fri, 3 Jan 2014 17:44:33 +0000 (-0500) Subject: Fix Brick LVM test command parsing X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=1d9927dacfc2d11e65f3392d8db465613b3843da;p=openstack-build%2Fcinder-build.git Fix Brick LVM test command parsing The case reporting only one fake-volumes VG was never hit, which also caused us to not test the lvcreate -T path. Change-Id: If43d6aff5f90d6eca24b3df790d8ad3a86bfc8f3 --- diff --git a/cinder/tests/brick/test_brick_lvm.py b/cinder/tests/brick/test_brick_lvm.py index bbc0d3f95..f7ba541f2 100644 --- a/cinder/tests/brick/test_brick_lvm.py +++ b/cinder/tests/brick/test_brick_lvm.py @@ -93,7 +93,8 @@ class BrickLvmTestCase(test.TestCase): data = ' wi-a-' else: data = ' owi-a-' - elif 'pvs, --noheadings' and 'fake-volumes' in cmd_string: + elif 'pvs, --noheadings' in cmd_string \ + and 'fake-volumes' in cmd_string: data = " fake-volumes:/dev/sda:10.00g:8.99g\n" elif 'pvs, --noheadings' in cmd_string: data = " fake-volumes:/dev/sda:10.00g:8.99g\n" @@ -102,6 +103,10 @@ class BrickLvmTestCase(test.TestCase): elif 'lvs, --noheadings, --unit=g, -o, size,data_percent, ' \ '--separator, :' in cmd_string: data = " 9:12\n" + elif 'lvcreate, -T, -L, ' in cmd_string: + pass + elif 'lvcreate, -T, -V, ' in cmd_string: + pass else: raise AssertionError('unexpected command called: %s' % cmd_string)