Vered Volansky has posted comments on this change.

Change subject: core: Fix Remove Storage error message(#863097)
......................................................................


Patch Set 1: (5 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageDomainCommandBase.java
Line 149: 
Line 150:     @Override
Line 151:     protected boolean canDoAction() {
Line 152:         return super.canDoAction();
Line 153:     }
oops...
Line 154: 
Line 155:     protected boolean checkStorageDomainNameLengthValid() {
Line 156:         boolean result = true;
Line 157:         if (getStorageDomain().getstorage_name().length() > Config


....................................................
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());
It isn't.
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",


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());
Line 54:         command.setActionMessageParameters();
Will fix.
Line 55:         List<String> messages = 
command.getReturnValue().getCanDoActionMessages();
Line 56:         assertEquals("Wrong number of messages", 3, messages.size());
Line 57:         assertEquals("Wrong message",
Line 58:                 
VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NOT_EXIST.name(),


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",
Line 58:                 
VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NOT_EXIST.name(),
It doesn't matter since there won't be 3 messages once I fix the above, but 
just so you'd know - the message is clear. It says what was expected and what 
is there instead.
Line 59:                 messages.get(0));
Line 60:         assertEquals("Wrong message",
Line 61:                 VdcBllMessages.VAR__TYPE__STORAGE__DOMAIN.name(),
Line 62:                 messages.get(1));


....................................................
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/RemoveStorageDomainTest.java
Line 85:         checkSucceeded(cmd, false);
Line 86:         cmd.setActionMessageParameters();
Line 87:         checkMessages(cmd,
Line 88:                 VdcBllMessages.VAR__TYPE__STORAGE__DOMAIN,
Line 89:                 VdcBllMessages.VAR__ACTION__REMOVE);
Will, fix. Note that this means no messages here at all.
Line 90:     }
Line 91: 
Line 92:     @Test
Line 93:     public void testRemoveNfsData() {


--
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

Reply via email to