Allon Mureinik has posted comments on this change.

Change subject: core: Add storage space validator
......................................................................


Patch Set 5: I would prefer that you didn't submit this

(3 inline comments)

some issues in the test, please fix.

....................................................
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/StorageDomainValidatorTest.java
Line 17: /** A test case for the {@link StorageDomainValidator} class. */
Line 18: public class StorageDomainValidatorTest {
Line 19:     private storage_domains domain;
Line 20:     private StorageDomainValidator validator;
Line 21:     private static int FREE_SPACE_CRITICAL_LOW_IN_GB = 5;
should be final
Line 22: 
Line 23:     @ClassRule
Line 24:     public static MockConfigRule mcr = new MockConfigRule(
Line 25:             mockConfig(ConfigValues.FreeSpaceCriticalLowInGB, 
FREE_SPACE_CRITICAL_LOW_IN_GB)


Line 71: 
Line 72:     @Test
Line 73:     public void testDomainWithEnoughSpaceForRequest() {
Line 74:         validator = new StorageDomainValidator(mockStorageDomain(16, 
748, StorageType.NFS));
Line 75:         assertTrue("Domain should have more space then threshold", 
validator.isDomainWithinThresholds().isValid());
should check what the test is named for `-)
Line 76:     }
Line 77: 
Line 78:     @Test
Line 79:     public void testDomainWithEnoughSpace() {


Line 80:         validator = new StorageDomainValidator(mockStorageDomain(6, 
756, StorageType.NFS));
Line 81:         assertTrue("Domain should have more space then threshold", 
validator.isDomainWithinThresholds().isValid());
Line 82:     }
Line 83: 
Line 84:     private storage_domains mockStorageDomain(int availableSize, int 
usedSize, StorageType storageType) {
can be static
Line 85:         storage_domains sd = new storage_domains();
Line 86:         sd.setavailable_disk_size(availableSize);
Line 87:         sd.setused_disk_size(usedSize);
Line 88:         sd.setstatus(StorageDomainStatus.Active);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I097965d6362bd54d12860d5409f5c14d569a8968
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to