Moti Asayag has posted comments on this change.

Change subject: engine: Refactor UpdateVdsCommand to use UpdateHostValidator
......................................................................


Patch Set 4:

@Omer,

That's why I first refactored the previous implementation of this method [1] 
into a "digestible" function that could be safely refactored.

I could add a test that extract the validator into a getter, mock it and return 
true for all of its method and verify all of those methods were actually called 
from the can-do-action of this command.
But that would just verify the existing code and not that the previous code 
wasn't harmed by this refactor.

The easiest thing to do is to count the number of return statements from [1] 
and compare them to the number of && in the new can-do-action.

In any case, If you'd like me to add such test - i'd add it in a later patch 
and continue on merging this series of patches.

[1] http://gerrit.ovirt.org/#/c/37467

-- 
To view, visit http://gerrit.ovirt.org/37470
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4261f0ee923f081904a9b3d35f5c42747844b7b7
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Moti Asayag <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to