ofri masad has posted comments on this change. Change subject: engine: test for AddVdsCommand ......................................................................
Patch Set 7: (5 inline comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsCommand.java Line 277: DbFacade.getInstance().getVdsStatisticsDao().save(vdsStatistics); Line 278: getCompensationContext().snapshotNewEntity(vdsStatistics); Line 279: } Line 280: Line 281: boolean validateVdsGroup() { please set a modifier - protected seem suitable Line 282: if (getVdsGroup() == null) { Line 283: return failCanDoAction(VdcBllMessages.VDS_CLUSTER_IS_NOT_VALID); Line 284: } Line 285: return true; Line 345: } Line 346: return returnValue; Line 347: } Line 348: Line 349: boolean isPowerManagementLegal() { please set a modifier - protected seem suitable Line 350: return IsPowerManagementLegal(getParameters().getVdsStaticData(), getVdsGroup() Line 351: .getcompatibility_version().toString()); Line 352: } Line 353: Line 358: public SSHClient getSSHClient() { Line 359: return new SSHClient(); Line 360: } Line 361: Line 362: boolean canConnect(VDS vds) { please set a modifier - protected seem suitable Line 363: boolean returnValue = true; Line 364: Line 365: // execute the connectivity and id uniqueness validation for VDS type hosts Line 366: if (vds.getVdsType() == VDSType.VDS && Config.<Boolean> GetValue(ConfigValues.InstallVds)) { Line 404: Line 405: return returnValue; Line 406: } Line 407: Line 408: boolean validateSingleHostAttachedToLocalStorage() { please set a modifier - protected seem suitable Line 409: boolean retrunValue = true; Line 410: storage_pool storagePool = DbFacade.getInstance().getStoragePoolDao().getForVdsGroup( Line 411: getParameters().getVdsStaticData().getVdsGroupId()); Line 412: .................................................... File backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AddVdsCommandTest.java Line 12: import org.ovirt.engine.core.dao.VdsDAO; 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 { This test only check for one positive flow. what about negative flows? null name, empty name, too long name, null vdsGroup, null id..... Line 17: private VDS makeTestVds(Guid vdsId) { Line 18: VDS newVdsData = new VDS(); Line 19: newVdsData.setHostName("BUZZ"); Line 20: newVdsData.setVdsName("BAR"); -- 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: 7 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Laszlo Hornyak <lhorn...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Laszlo Hornyak <lhorn...@redhat.com> Gerrit-Reviewer: ofri masad <oma...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches