Allon Mureinik has posted comments on this change.
Change subject: core: Fix Remove Storage error message(#863097)
......................................................................
Patch Set 1: (3 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageDomainCommandBase.java
Line 145: @Override
Line 146: protected void setActionMessageParameters() {
Line 147:
addCanDoActionMessage(VdcBllMessages.VAR__TYPE__STORAGE__DOMAIN);
Line 148: }
Line 149:
Liron - please note that the gerrit convention is to comment /BELOW/ the
relevant line of code, so when it's sent by email it's clear what your review
refers to.
As you'll notice - I've already commented on this ;-)
Line 150: @Override
Line 151: protected boolean canDoAction() {
Line 152: return super.canDoAction();
Line 153: }
....................................................
File
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/RemoveStorageDomainCommandTest.java
Line 49: @Test
Line 50: public void testCanDoActionNonExistingStorageDomain() {
Line 51: // All the mock DAOs return nulls (which mocks the objects do
not exist)
Line 52: // canDoAction should return false, not crash with
NullPointerExcpetion
Line 53: assertFalse("canDoActtion shouldn't be possible for a
non-existant storage domain", command.canDoAction());
Nope.
they are bundled inside canDoActionOnly and/or execute().
See my comment below.
Line 54: command.setActionMessageParameters();
Line 55: List<String> messages =
command.getReturnValue().getCanDoActionMessages();
Line 56: assertEquals("Wrong number of messages", 3, messages.size());
Line 57: assertEquals("Wrong message",
....................................................
File
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/RemoveStorageDomainTest.java
Line 81:
Line 82: RemoveStorageDomainCommand<RemoveStorageDomainParameters> cmd
= createCommand(true);
Line 83: assertTrue(cmd.canDoAction());
Line 84:
Line 85: checkSucceeded(cmd, false);
See my comment in the previous file.
Line 86: cmd.setActionMessageParameters();
Line 87: checkMessages(cmd,
Line 88: VdcBllMessages.VAR__TYPE__STORAGE__DOMAIN,
Line 89: VdcBllMessages.VAR__ACTION__REMOVE);
--
To view, visit http://gerrit.ovirt.org/10265
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I8b737545c0519cc2034bb6eec36afcc38da26059
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vered Volansky <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches