Change in ovirt-engine[master]: core: UpdateVdsCommandTest spying

amureini at redhat.com amureini at redhat.com
Sat Oct 1 19:37:13 UTC 2016


Allon Mureinik has submitted this change and it was merged.

Change subject: core: UpdateVdsCommandTest spying
......................................................................


core: UpdateVdsCommandTest spying

Mocking an object and calling doRetrunRealMethod() on most of its
methods is essentially spying it, but with the wrong default (a mocked
result instead of the real one).

Since the command is the actual object we want to test, it should NOT be
mocked, and only the relevant parts (e.g., where it interacts with
external resources) should be spied away.

Change-Id: I505bfbaead2ea2f5b34971dee4b6dbc074f2fe3b
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/hostdeploy/UpdateVdsCommandTest.java
1 file changed, 35 insertions(+), 16 deletions(-)

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



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I505bfbaead2ea2f5b34971dee4b6dbc074f2fe3b
Gerrit-PatchSet: 7
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 Peřina <mperina 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