There was a unit test that was not mocking utils.execute() and relying
on qemu-img being installed on the machine running the tests. This fixes
the test to mock out utils.execute() and raise a ProcessExecutionError
that simulates the expected behaviour from qemu-img.
Fixes bug: #1765122
Change-Id: Ia6fc089fce0cc0ba1fb8d4d4ffbf7f47968a0507
(cherry picked from commit 815b11f70a3fd31888fb3e3e7b38e3a697bf6244)
(cherry picked from commit cf927f177be3ff0d1df069bc66f889ebcce93754)
Reviewed: https:/ /review. openstack. org/578058 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=ba0eb30a75c 0e20dfe0e8065d9 765292fc963e95
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit ba0eb30a75c0e20 dfe0e8065d97652 92fc963e95
Author: Jay Pipes <email address hidden>
Date: Wed Apr 18 12:39:35 2018 -0400
mock utils.execute() in qemu-img unit test
There was a unit test that was not mocking utils.execute() and relying nError
on qemu-img being installed on the machine running the tests. This fixes
the test to mock out utils.execute() and raise a ProcessExecutio
that simulates the expected behaviour from qemu-img.
Fixes bug: #1765122
Change-Id: Ia6fc089fce0cc0 ba1fb8d4d4ffbf7 f47968a0507 888fb3e3e7b38e3 a697bf6244) d1df069bc66f889 ebcce93754)
(cherry picked from commit 815b11f70a3fd31
(cherry picked from commit cf927f177be3ff0