]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix Brick LVM test command parsing
authorEric Harney <eharney@redhat.com>
Fri, 3 Jan 2014 17:44:33 +0000 (12:44 -0500)
committerEric Harney <eharney@redhat.com>
Sat, 4 Jan 2014 16:44:37 +0000 (11:44 -0500)
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

cinder/tests/brick/test_brick_lvm.py

index bbc0d3f95bcca78897b904dba854e94599b46a9e..f7ba541f2247136b37a863dc537d2662430b4652 100644 (file)
@@ -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)