Change in ovirt-engine[master]: core: ImportVmCommandTest single command instance

amureini at redhat.com amureini at redhat.com
Thu Oct 13 20:50:22 UTC 2016


Allon Mureinik has submitted this change and it was merged.

Change subject: core: ImportVmCommandTest single command instance
......................................................................


core: ImportVmCommandTest single command instance

Rework the test to use a single command instance, annotated with @Spy
and @InjectMocks in order to reduce code duplication and allow easier
injections.

Note that the OsRepository is used to initialize a data member in
VmCommand,  so it must be mocked in a static context, before the
command instance is created.

Change-Id: Ieced27c9f6ff5b60ece9a8927133b9b9833804b1
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/exportimport/ImportVmCommandTest.java
1 file changed, 78 insertions(+), 100 deletions(-)

Approvals:
  Tal Nisan: Looks good to me, approved
  Allon Mureinik: Verified; Passed CI tests



-- 
To view, visit https://gerrit.ovirt.org/64680
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieced27c9f6ff5b60ece9a8927133b9b9833804b1
Gerrit-PatchSet: 11
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list