Laszlo Hornyak has posted comments on this change.
Change subject: engine: test for AddVdsCommand
......................................................................
Patch Set 5: (4 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsCommand.java
Line 188: }
Line 189: }
Line 190: }
Line 191:
Line 192: boolean isGlusterSupportEnabled() {
Done
Line 193: return getVdsGroup().supportsGlusterService() &&
getParameters().isGlusterPeerProbeNeeded();
Line 194: }
Line 195:
Line 196: /**
Line 279:
Line 280: boolean validateVdsGroup() {
Line 281: if (getVdsGroup() == null) {
Line 282:
addCanDoActionMessage(VdcBllMessages.VDS_CLUSTER_IS_NOT_VALID);
Line 283: return false;
Done
Line 284: }
Line 285: return true;
Line 286: }
Line 287:
....................................................
File
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AddVdsCommandTest.java
Line 13: import org.ovirt.engine.core.dao.VdsGroupDAO;
Line 14: import org.ovirt.engine.core.utils.MockConfigRule;
Line 15:
Line 16: public class AddVdsCommandTest {
Line 17: private VDS makeTestVds(Guid vdsId) {
no agreement, leaving as is
Line 18: VDS newVdsData = new VDS();
Line 19: newVdsData.setHostName("BUZZ");
Line 20: newVdsData.setVdsName("BAR");
Line 21: newVdsData.setVdsGroupCompatibilityVersion(new
Version("1.2.3"));
Line 48:
Mockito.when(commandMock.getVdsGroupDAO()).thenReturn(groupDAOMock);
Line 49:
Line 50: VdsDAO vdsDaoMock = Mockito.mock(VdsDAO.class);
Line 51: Mockito.when(vdsDaoMock.get(vdsId)).thenReturn(null);
Line 52: // Mockito.when(vdsDaoMock.get(vdsId)).thenReturn(null);
Done
Line 53: Mockito.when(commandMock.getVdsDAO()).thenReturn(vdsDaoMock);
Line 54: Mockito.when(commandMock.validateVdsGroup()).thenReturn(true);
Line 55:
Mockito.when(commandMock.validateSingleHostAttachedToLocalStorage()).thenReturn(true);
Line 56:
Mockito.when(commandMock.isPowerManagementLegal()).thenReturn(true);
--
To view, visit http://gerrit.ovirt.org/12193
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iaa8b31e3bb4f96e34d7ea7e97ec8c4c5b1f19984
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Laszlo Hornyak <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches