Sharad Mishra has posted comments on this change.

Change subject: core: WIP: Update StoragePoolValidator test to test GlusterFS.
......................................................................


Patch Set 1: (3 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StoragePoolValidator.java
Line 54:         if (storagePool.getstorage_pool_type() == StorageType.GLUSTERFS
Line 55:                 && !this.<Boolean> 
getConfigValue(ConfigValues.GlusterFsStorageEnabled,
Line 56:                         storagePool.getcompatibility_version()
Line 57:                         .toString())) {
Line 58:             
canDoActionMessages.add(VdcBllMessages.DATA_CENTER_POSIX_STORAGE_NOT_SUPPORTED_IN_CURRENT_VERSION.toString());
Using the same message string for both posix and gluster as the actual error 
displayed to the user and associated with this string is generic for both cases.
Line 59:             return false;
Line 60:         }
Line 61:         return true;
Line 62:     }


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/UpdateStoragePoolCommand.java
Line 198:             returnValue = 
validator.isPosixDcAndMatchingCompatiblityVersion();
Line 199:         }
Line 200:         if (returnValue) {
Line 201:             returnValue = 
validator.isGlusterDcAndMatchingCompatiblityVersion();
Line 202:         }
Done
Line 203:         addCanDoActionMessage(VdcBllMessages.VAR__ACTION__UPDATE);
Line 204:         return returnValue;
Line 205:     }
Line 206: 


....................................................
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/StoragePoolValidatorTest.java
Line 85:     public void testGlusterDcAndNotMatchingCompatiblityVersion() {
Line 86:         storagePool.setcompatibility_version(Version.v3_1);
Line 87:         storagePool.setstorage_pool_type(StorageType.GLUSTERFS);
Line 88:         
assertFalse(validator.isGlusterDcAndMatchingCompatiblityVersion());
Line 89:         
assertMessages(VdcBllMessages.DATA_CENTER_POSIX_STORAGE_NOT_SUPPORTED_IN_CURRENT_VERSION);
Using the same string constant for both, gluster and posixfs.
Line 90:     }
Line 91:     @Test
Line 92:     public void testLocalDcAndMatchingCompatiblityVersion() {
Line 93:         storagePool.setcompatibility_version(Version.v3_0);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie4cd98cd06716c31248d8ec4f21a3a6f79f13102
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sharad Mishra <[email protected]>
Gerrit-Reviewer: Deepak C Shetty <[email protected]>
Gerrit-Reviewer: Itamar Heim <[email protected]>
Gerrit-Reviewer: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Sharad Mishra <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to