diff options
| author | Zuul <zuul@review.opendev.org> | 2021-02-11 23:31:37 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2021-02-11 23:31:37 +0000 |
| commit | 13c3c60ff1716cb25d0a33e85089304ae49ef8e2 (patch) | |
| tree | ddde177bae42a81402341659e636a97e3210bbaf /ironic_python_agent/tests | |
| parent | be30e0abe86f2476ac6460d3302964b67b9afa20 (diff) | |
| parent | 403d2f06c670475b95de2bd971dcfcb83f166529 (diff) | |
| download | ironic-python-agent-13c3c60ff1716cb25d0a33e85089304ae49ef8e2.tar.gz | |
Merge "Fix error message with UEFI-incompatible images"6.6.0
Diffstat (limited to 'ironic_python_agent/tests')
| -rw-r--r-- | ironic_python_agent/tests/unit/extensions/test_image.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ironic_python_agent/tests/unit/extensions/test_image.py b/ironic_python_agent/tests/unit/extensions/test_image.py index 55ee60f7..d7093b6b 100644 --- a/ironic_python_agent/tests/unit/extensions/test_image.py +++ b/ironic_python_agent/tests/unit/extensions/test_image.py @@ -2107,6 +2107,16 @@ efibootmgr: ** Warning ** : Boot0005 has same label ironic1\n mock_get_part_uuid, mock_execute, mock_dispatch): mock_utils_efi_part.return_value = None + self.assertRaises(errors.DeviceNotFound, + image._manage_uefi, self.fake_dev, None) + self.assertFalse(mock_get_part_uuid.called) + + @mock.patch.object(image, '_get_partition', autospec=True) + @mock.patch.object(utils, 'get_efi_part_on_device', autospec=True) + def test__manage_uefi_empty_partition_by_uuid(self, mock_utils_efi_part, + mock_get_part_uuid, + mock_execute, mock_dispatch): + mock_utils_efi_part.return_value = None mock_get_part_uuid.return_value = self.fake_root_part result = image._manage_uefi(self.fake_dev, self.fake_root_uuid) self.assertFalse(result) |
