deploy_partition_image unittests fail

Bug #1552839 reported by Vladyslav Drok
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Undecided
Vladyslav Drok

Bug Description

Output:

==============================
Failed 12 tests - output below:
==============================

ironic.tests.unit.drivers.modules.test_deploy_utils.PhysicalWorkTestCase.test_deploy_partition_image_localboot
--------------------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
        return func(*args, **keywargs)
      File "ironic/tests/unit/drivers/modules/test_deploy_utils.py", line 433, in test_deploy_partition_image_localboot
        self._test_deploy_partition_image(boot_option="local")
      File "ironic/tests/unit/drivers/modules/test_deploy_utils.py", line 420, in _test_deploy_partition_image
        self.assertEqual(disk_utils_calls_expected, disk_utils_mock.mock_calls)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 362, in assertEqual
        self.assertThat(observed, matcher, message)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 447, in assertThat
        raise mismatch_error
    testtools.matchers._impl.MismatchError: !=:
    reference = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.destroy_disk_metadata('/dev/fake', '12345678-1234-1234-1234-1234567890abcxyz'),
     call.make_partitions('/dev/fake', 128, 64, 0, 0, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='bios', boot_option='local', commit=True),
     call.is_block_device('/dev/fake-part2'),
     call.is_block_device('/dev/fake-part1'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part2'),
     call.mkfs(dev='/dev/fake-part1', fs='swap', label='swap1'),
     call.block_uuid('/dev/fake-part2')]
    actual = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.destroy_disk_metadata('/dev/fake', '12345678-1234-1234-1234-1234567890abcxyz'),
     call.make_partitions('/dev/fake', 128, 64, 0, 0, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='bios', boot_option='local', commit=True, disk_label=None),
     call.is_block_device('/dev/fake-part2'),
     call.is_block_device('/dev/fake-part1'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part2'),
     call.mkfs(dev='/dev/fake-part1', fs='swap', label='swap1'),
     call.block_uuid('/dev/fake-part2')]

ironic.tests.unit.drivers.modules.test_deploy_utils.PhysicalWorkTestCase.test_deploy_partition_image_localboot_bios
-------------------------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
        return func(*args, **keywargs)
      File "ironic/tests/unit/drivers/modules/test_deploy_utils.py", line 444, in test_deploy_partition_image_localboot_bios
        boot_mode="bios")
      File "ironic/tests/unit/drivers/modules/test_deploy_utils.py", line 420, in _test_deploy_partition_image
        self.assertEqual(disk_utils_calls_expected, disk_utils_mock.mock_calls)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 362, in assertEqual
        self.assertThat(observed, matcher, message)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 447, in assertThat
        raise mismatch_error
    testtools.matchers._impl.MismatchError: !=:
    reference = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.destroy_disk_metadata('/dev/fake', '12345678-1234-1234-1234-1234567890abcxyz'),
     call.make_partitions('/dev/fake', 128, 64, 0, 0, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='bios', boot_option='local', commit=True),
     call.is_block_device('/dev/fake-part2'),
     call.is_block_device('/dev/fake-part1'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part2'),
     call.mkfs(dev='/dev/fake-part1', fs='swap', label='swap1'),
     call.block_uuid('/dev/fake-part2')]
    actual = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.destroy_disk_metadata('/dev/fake', '12345678-1234-1234-1234-1234567890abcxyz'),
     call.make_partitions('/dev/fake', 128, 64, 0, 0, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='bios', boot_option='local', commit=True, disk_label=None),
     call.is_block_device('/dev/fake-part2'),
     call.is_block_device('/dev/fake-part1'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part2'),
     call.mkfs(dev='/dev/fake-part1', fs='swap', label='swap1'),
     call.block_uuid('/dev/fake-part2')]

ironic.tests.unit.drivers.modules.test_deploy_utils.PhysicalWorkTestCase.test_deploy_partition_image_preserve_ephemeral
-----------------------------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
        return func(*args, **keywargs)
      File "ironic/tests/unit/drivers/modules/test_deploy_utils.py", line 783, in test_deploy_partition_image_preserve_ephemeral
        self.assertEqual(disk_utils_calls_expected, disk_utils_mock.mock_calls)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 362, in assertEqual
        self.assertThat(observed, matcher, message)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 447, in assertThat
        raise mismatch_error
    testtools.matchers._impl.MismatchError: !=:
    reference = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.make_partitions('/dev/fake', 128, 64, 256, 0, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='bios', boot_option='netboot', commit=False),
     call.is_block_device('/dev/fake-part3'),
     call.is_block_device('/dev/fake-part2'),
     call.is_block_device('/dev/fake-part1'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part3'),
     call.mkfs(dev='/dev/fake-part2', fs='swap', label='swap1'),
     call.block_uuid('/dev/fake-part3')]
    actual = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.make_partitions('/dev/fake', 128, 64, 256, 0, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='bios', boot_option='netboot', commit=False, disk_label=None),
     call.is_block_device('/dev/fake-part3'),
     call.is_block_device('/dev/fake-part2'),
     call.is_block_device('/dev/fake-part1'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part3'),
     call.mkfs(dev='/dev/fake-part2', fs='swap', label='swap1'),
     call.block_uuid('/dev/fake-part3')]

ironic.tests.unit.drivers.modules.test_deploy_utils.PhysicalWorkTestCase.test_deploy_partition_image_netboot_bios
-----------------------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
        return func(*args, **keywargs)
      File "ironic/tests/unit/drivers/modules/test_deploy_utils.py", line 440, in test_deploy_partition_image_netboot_bios
        boot_mode="bios")
      File "ironic/tests/unit/drivers/modules/test_deploy_utils.py", line 420, in _test_deploy_partition_image
        self.assertEqual(disk_utils_calls_expected, disk_utils_mock.mock_calls)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 362, in assertEqual
        self.assertThat(observed, matcher, message)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 447, in assertThat
        raise mismatch_error
    testtools.matchers._impl.MismatchError: !=:
    reference = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.destroy_disk_metadata('/dev/fake', '12345678-1234-1234-1234-1234567890abcxyz'),
     call.make_partitions('/dev/fake', 128, 64, 0, 0, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='bios', boot_option='netboot', commit=True),
     call.is_block_device('/dev/fake-part2'),
     call.is_block_device('/dev/fake-part1'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part2'),
     call.mkfs(dev='/dev/fake-part1', fs='swap', label='swap1'),
     call.block_uuid('/dev/fake-part2')]
    actual = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.destroy_disk_metadata('/dev/fake', '12345678-1234-1234-1234-1234567890abcxyz'),
     call.make_partitions('/dev/fake', 128, 64, 0, 0, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='bios', boot_option='netboot', commit=True, disk_label=None),
     call.is_block_device('/dev/fake-part2'),
     call.is_block_device('/dev/fake-part1'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part2'),
     call.mkfs(dev='/dev/fake-part1', fs='swap', label='swap1'),
     call.block_uuid('/dev/fake-part2')]

ironic.tests.unit.drivers.modules.test_deploy_utils.PhysicalWorkTestCase.test_deploy_partition_image_netboot_uefi
-----------------------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
        return func(*args, **keywargs)
      File "ironic/tests/unit/drivers/modules/test_deploy_utils.py", line 448, in test_deploy_partition_image_netboot_uefi
        boot_mode="uefi")
      File "ironic/tests/unit/drivers/modules/test_deploy_utils.py", line 420, in _test_deploy_partition_image
        self.assertEqual(disk_utils_calls_expected, disk_utils_mock.mock_calls)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 362, in assertEqual
        self.assertThat(observed, matcher, message)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 447, in assertThat
        raise mismatch_error
    testtools.matchers._impl.MismatchError: !=:
    reference = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.destroy_disk_metadata('/dev/fake', '12345678-1234-1234-1234-1234567890abcxyz'),
     call.make_partitions('/dev/fake', 128, 64, 0, 0, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='uefi', boot_option='netboot', commit=True),
     call.is_block_device('/dev/fake-part2'),
     call.is_block_device('/dev/fake-part1'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part2'),
     call.mkfs(dev='/dev/fake-part1', fs='swap', label='swap1'),
     call.block_uuid('/dev/fake-part2')]
    actual = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.destroy_disk_metadata('/dev/fake', '12345678-1234-1234-1234-1234567890abcxyz'),
     call.make_partitions('/dev/fake', 128, 64, 0, 0, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='uefi', boot_option='netboot', commit=True, disk_label=None),
     call.is_block_device('/dev/fake-part2'),
     call.is_block_device('/dev/fake-part1'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part2'),
     call.mkfs(dev='/dev/fake-part1', fs='swap', label='swap1'),
     call.block_uuid('/dev/fake-part2')]

ironic.tests.unit.drivers.modules.test_deploy_utils.PhysicalWorkTestCase.test_deploy_partition_image_with_ephemeral
-------------------------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
        return func(*args, **keywargs)
      File "ironic/tests/unit/drivers/modules/test_deploy_utils.py", line 711, in test_deploy_partition_image_with_ephemeral
        self.assertEqual(disk_utils_calls_expected, disk_utils_mock.mock_calls)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 362, in assertEqual
        self.assertThat(observed, matcher, message)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 447, in assertThat
        raise mismatch_error
    testtools.matchers._impl.MismatchError: !=:
    reference = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.destroy_disk_metadata('/dev/fake', '12345678-1234-1234-1234-1234567890abcxyz'),
     call.make_partitions('/dev/fake', 128, 64, 256, 0, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='bios', boot_option='netboot', commit=True),
     call.is_block_device('/dev/fake-part3'),
     call.is_block_device('/dev/fake-part2'),
     call.is_block_device('/dev/fake-part1'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part3'),
     call.mkfs(dev='/dev/fake-part2', fs='swap', label='swap1'),
     call.mkfs(dev='/dev/fake-part1', fs='exttest', label='ephemeral0'),
     call.block_uuid('/dev/fake-part3')]
    actual = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.destroy_disk_metadata('/dev/fake', '12345678-1234-1234-1234-1234567890abcxyz'),
     call.make_partitions('/dev/fake', 128, 64, 256, 0, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='bios', boot_option='netboot', commit=True, disk_label=None),
     call.is_block_device('/dev/fake-part3'),
     call.is_block_device('/dev/fake-part2'),
     call.is_block_device('/dev/fake-part1'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part3'),
     call.mkfs(dev='/dev/fake-part2', fs='swap', label='swap1'),
     call.mkfs(dev='/dev/fake-part1', fs='exttest', label='ephemeral0'),
     call.block_uuid('/dev/fake-part3')]

ironic.tests.unit.drivers.modules.test_deploy_utils.PhysicalWorkTestCase.test_deploy_partition_image_wo_boot_option_and_wo_boot_mode
------------------------------------------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
        return func(*args, **keywargs)
      File "ironic/tests/unit/drivers/modules/test_deploy_utils.py", line 436, in test_deploy_partition_image_wo_boot_option_and_wo_boot_mode
        self._test_deploy_partition_image()
      File "ironic/tests/unit/drivers/modules/test_deploy_utils.py", line 420, in _test_deploy_partition_image
        self.assertEqual(disk_utils_calls_expected, disk_utils_mock.mock_calls)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 362, in assertEqual
        self.assertThat(observed, matcher, message)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 447, in assertThat
        raise mismatch_error
    testtools.matchers._impl.MismatchError: !=:
    reference = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.destroy_disk_metadata('/dev/fake', '12345678-1234-1234-1234-1234567890abcxyz'),
     call.make_partitions('/dev/fake', 128, 64, 0, 0, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='bios', boot_option='netboot', commit=True),
     call.is_block_device('/dev/fake-part2'),
     call.is_block_device('/dev/fake-part1'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part2'),
     call.mkfs(dev='/dev/fake-part1', fs='swap', label='swap1'),
     call.block_uuid('/dev/fake-part2')]
    actual = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.destroy_disk_metadata('/dev/fake', '12345678-1234-1234-1234-1234567890abcxyz'),
     call.make_partitions('/dev/fake', 128, 64, 0, 0, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='bios', boot_option='netboot', commit=True, disk_label=None),
     call.is_block_device('/dev/fake-part2'),
     call.is_block_device('/dev/fake-part1'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part2'),
     call.mkfs(dev='/dev/fake-part1', fs='swap', label='swap1'),
     call.block_uuid('/dev/fake-part2')]

ironic.tests.unit.drivers.modules.test_deploy_utils.PhysicalWorkTestCase.test_deploy_partition_image_with_configdrive
---------------------------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
        return func(*args, **keywargs)
      File "ironic/tests/unit/drivers/modules/test_deploy_utils.py", line 861, in test_deploy_partition_image_with_configdrive
        self.assertEqual(disk_utils_calls_expected, disk_utils_mock.mock_calls)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 362, in assertEqual
        self.assertThat(observed, matcher, message)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 447, in assertThat
        raise mismatch_error
    testtools.matchers._impl.MismatchError: !=:
    reference = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.destroy_disk_metadata('/dev/fake', '12345678-1234-1234-1234-1234567890abcxyz'),
     call._get_configdrive('http://1.2.3.4/cd', '12345678-1234-1234-1234-1234567890abcxyz', tempdir=None),
     call.make_partitions('/dev/fake', 128, 0, 0, 10, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='bios', boot_option='netboot', commit=True),
     call.is_block_device('/dev/fake-part2'),
     call.is_block_device('/dev/fake-part1'),
     call.dd(<ANY>, '/dev/fake-part1'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part2'),
     call.block_uuid('/dev/fake-part2')]
    actual = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.destroy_disk_metadata('/dev/fake', '12345678-1234-1234-1234-1234567890abcxyz'),
     call._get_configdrive('http://1.2.3.4/cd', '12345678-1234-1234-1234-1234567890abcxyz', tempdir=None),
     call.make_partitions('/dev/fake', 128, 0, 0, 10, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='bios', boot_option='netboot', commit=True, disk_label=None),
     call.is_block_device('/dev/fake-part2'),
     call.is_block_device('/dev/fake-part1'),
     call.dd('configdrive-path', '/dev/fake-part1'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part2'),
     call.block_uuid('/dev/fake-part2')]

ironic.tests.unit.drivers.modules.test_deploy_utils.PhysicalWorkTestCase.test_deploy_partition_image_without_swap
-----------------------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
        return func(*args, **keywargs)
      File "ironic/tests/unit/drivers/modules/test_deploy_utils.py", line 631, in test_deploy_partition_image_without_swap
        self.assertEqual(disk_utils_calls_expected, disk_utils_mock.mock_calls)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 362, in assertEqual
        self.assertThat(observed, matcher, message)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 447, in assertThat
        raise mismatch_error
    testtools.matchers._impl.MismatchError: !=:
    reference = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.destroy_disk_metadata('/dev/fake', '12345678-1234-1234-1234-1234567890abcxyz'),
     call.make_partitions('/dev/fake', 128, 0, 0, 0, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='bios', boot_option='netboot', commit=True),
     call.is_block_device('/dev/fake-part1'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part1'),
     call.block_uuid('/dev/fake-part1')]
    actual = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.destroy_disk_metadata('/dev/fake', '12345678-1234-1234-1234-1234567890abcxyz'),
     call.make_partitions('/dev/fake', 128, 0, 0, 0, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='bios', boot_option='netboot', commit=True, disk_label=None),
     call.is_block_device('/dev/fake-part1'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part1'),
     call.block_uuid('/dev/fake-part1')]

ironic.tests.unit.drivers.modules.test_deploy_utils.PhysicalWorkTestCase.test_deploy_partition_image_localboot_uefi
-------------------------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
        return func(*args, **keywargs)
      File "ironic/tests/unit/drivers/modules/test_deploy_utils.py", line 559, in test_deploy_partition_image_localboot_uefi
        self.assertEqual(disk_utils_calls_expected, disk_utils_mock.mock_calls)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 362, in assertEqual
        self.assertThat(observed, matcher, message)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 447, in assertThat
        raise mismatch_error
    testtools.matchers._impl.MismatchError: !=:
    reference = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.destroy_disk_metadata('/dev/fake', '12345678-1234-1234-1234-1234567890abcxyz'),
     call.make_partitions('/dev/fake', 128, 64, 0, 0, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='uefi', boot_option='local', commit=True),
     call.is_block_device('/dev/fake-part3'),
     call.is_block_device('/dev/fake-part2'),
     call.is_block_device('/dev/fake-part1'),
     call.mkfs(dev='/dev/fake-part1', fs='vfat', label='efi-part'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part3'),
     call.mkfs(dev='/dev/fake-part2', fs='swap', label='swap1')]
    actual = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.destroy_disk_metadata('/dev/fake', '12345678-1234-1234-1234-1234567890abcxyz'),
     call.make_partitions('/dev/fake', 128, 64, 0, 0, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='uefi', boot_option='local', commit=True, disk_label=None),
     call.is_block_device('/dev/fake-part3'),
     call.is_block_device('/dev/fake-part2'),
     call.is_block_device('/dev/fake-part1'),
     call.mkfs(dev='/dev/fake-part1', fs='vfat', label='efi-part'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part3'),
     call.mkfs(dev='/dev/fake-part2', fs='swap', label='swap1')]

ironic.tests.unit.drivers.modules.test_deploy_utils.PhysicalWorkTestCase.test_deploy_partition_image_without_boot_option
------------------------------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
        return func(*args, **keywargs)
      File "ironic/tests/unit/drivers/modules/test_deploy_utils.py", line 427, in test_deploy_partition_image_without_boot_option
        self._test_deploy_partition_image()
      File "ironic/tests/unit/drivers/modules/test_deploy_utils.py", line 420, in _test_deploy_partition_image
        self.assertEqual(disk_utils_calls_expected, disk_utils_mock.mock_calls)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 362, in assertEqual
        self.assertThat(observed, matcher, message)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 447, in assertThat
        raise mismatch_error
    testtools.matchers._impl.MismatchError: !=:
    reference = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.destroy_disk_metadata('/dev/fake', '12345678-1234-1234-1234-1234567890abcxyz'),
     call.make_partitions('/dev/fake', 128, 64, 0, 0, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='bios', boot_option='netboot', commit=True),
     call.is_block_device('/dev/fake-part2'),
     call.is_block_device('/dev/fake-part1'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part2'),
     call.mkfs(dev='/dev/fake-part1', fs='swap', label='swap1'),
     call.block_uuid('/dev/fake-part2')]
    actual = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.destroy_disk_metadata('/dev/fake', '12345678-1234-1234-1234-1234567890abcxyz'),
     call.make_partitions('/dev/fake', 128, 64, 0, 0, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='bios', boot_option='netboot', commit=True, disk_label=None),
     call.is_block_device('/dev/fake-part2'),
     call.is_block_device('/dev/fake-part1'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part2'),
     call.mkfs(dev='/dev/fake-part1', fs='swap', label='swap1'),
     call.block_uuid('/dev/fake-part2')]

ironic.tests.unit.drivers.modules.test_deploy_utils.PhysicalWorkTestCase.test_deploy_partition_image_netboot
------------------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
        return func(*args, **keywargs)
      File "ironic/tests/unit/drivers/modules/test_deploy_utils.py", line 430, in test_deploy_partition_image_netboot
        self._test_deploy_partition_image(boot_option="netboot")
      File "ironic/tests/unit/drivers/modules/test_deploy_utils.py", line 420, in _test_deploy_partition_image
        self.assertEqual(disk_utils_calls_expected, disk_utils_mock.mock_calls)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 362, in assertEqual
        self.assertThat(observed, matcher, message)
      File "/home/vlad/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 447, in assertThat
        raise mismatch_error
    testtools.matchers._impl.MismatchError: !=:
    reference = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.destroy_disk_metadata('/dev/fake', '12345678-1234-1234-1234-1234567890abcxyz'),
     call.make_partitions('/dev/fake', 128, 64, 0, 0, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='bios', boot_option='netboot', commit=True),
     call.is_block_device('/dev/fake-part2'),
     call.is_block_device('/dev/fake-part1'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part2'),
     call.mkfs(dev='/dev/fake-part1', fs='swap', label='swap1'),
     call.block_uuid('/dev/fake-part2')]
    actual = [call.get_image_mb('/tmp/xyz/image'),
     call.is_block_device('/dev/fake'),
     call.destroy_disk_metadata('/dev/fake', '12345678-1234-1234-1234-1234567890abcxyz'),
     call.make_partitions('/dev/fake', 128, 64, 0, 0, '12345678-1234-1234-1234-1234567890abcxyz', boot_mode='bios', boot_option='netboot', commit=True, disk_label=None),
     call.is_block_device('/dev/fake-part2'),
     call.is_block_device('/dev/fake-part1'),
     call.populate_image('/tmp/xyz/image', '/dev/fake-part2'),
     call.mkfs(dev='/dev/fake-part1', fs='swap', label='swap1'),
     call.block_uuid('/dev/fake-part2')]

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

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

Changed in ironic:
assignee: nobody → Vladyslav Drok (vdrok)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/288044
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=036b959b9245ba44b5ea895ea48584dedc282fdf
Submitter: Jenkins
Branch: master

commit 036b959b9245ba44b5ea895ea48584dedc282fdf
Author: Vladyslav Drok <email address hidden>
Date: Thu Mar 3 20:09:33 2016 +0200

    Fix unittests after new releases of libraries

    ironic-lib and galnceclient releases caused some of unittests to fail,
    this change fixes them.

    Two unittests in the test_glance_service.py module was depending on
    getting an instance of the real glanceclient and it was failing due a
    new glanceclient release. This patch is fixing the problem by mocking
    the client instanciation.

    In case of ironic-lib, new argument was added to make_partitions
    function, and the mocks need to be changed.

    Closes-bug: #1552839
    Closes-Bug: #1552834
    Co-Authored-By: Lucas Alvares Gomes <email address hidden>
    Change-Id: Ic9dc3f1016667c6d7ec5ee324d5fff48af82c581

Changed in ironic:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/288207

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (stable/liberty)

Reviewed: https://review.openstack.org/288207
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=e9f49ad195884a973e32105f4e3f22512d967f0e
Submitter: Jenkins
Branch: stable/liberty

commit e9f49ad195884a973e32105f4e3f22512d967f0e
Author: Vladyslav Drok <email address hidden>
Date: Thu Mar 3 20:09:33 2016 +0200

    Fix unittests after new release of glanceclient

    Two unittests in the test_glance_service.py module was depending on
    getting an instance of the real glanceclient and it was failing due a
    new glanceclient release. This patch is fixing the problem by mocking
    the client instanciation.

    Closes-bug: #1552839
    Closes-Bug: #1552834
    Co-Authored-By: Lucas Alvares Gomes <email address hidden>
    Change-Id: Ic9dc3f1016667c6d7ec5ee324d5fff48af82c581
    (cherry picked from commit 036b959b9245ba44b5ea895ea48584dedc282fdf)

tags: added: in-stable-liberty
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.