Ala Hino has posted comments on this change.

Change subject: gluster: Allow gluster mount with additional servers
......................................................................


Patch Set 5:

(5 comments)

https://gerrit.ovirt.org/#/c/40665/5/tests/glusterStorageServerTests.py
File tests/glusterStorageServerTests.py:

Line 17: class FakeMount(object):
Line 18: 
Line 19:     def __init__(self, spec, localPath):
Line 20:         self._remotePath = spec
Line 21:         self._localPath = localPath
> Use public names (self.remotePath etc.), we want to peek into these values
Done
Line 22:         self.fs_file = ""
Line 23: 
Line 24:     def isMounted(self):
Line 25:         return False


Line 21:         self._localPath = localPath
Line 22:         self.fs_file = ""
Line 23: 
Line 24:     def isMounted(self):
Line 25:         return False
> Make it return self.mounted - so we can test the behavior when remounting.
Done
Line 26: 
Line 27:     def mount(self, options, vfsType):
Line 28:         self._options = options
Line 29:         self._vfsType = vfsType


Line 28:         self._options = options
Line 29:         self._vfsType = vfsType
Line 30: 
Line 31:     def getRecord(self):
Line 32:         return self
> Simple and nice!
Done
Line 33: 
Line 34: 
Line 35: class GlusterFSConnectionTests(VdsmTestCase):
Line 36: 


Line 77:         gluster = GlusterFSConnection(spec="192.168.122.1:/music",
Line 78:                                       mountClass=FakeMount)
Line 79:         try:
Line 80:             gluster.connect()
Line 81:             self.assertEquals(gluster._mount._options, 
self.MOUNT_OPTIONS)
> You don't need to connect to check the mount options - please see my commen
Updated unit test to test gluster mount options.
Other tests to be addressed in separate patches.
Line 82:         finally:


Line 79:         try:
Line 80:             gluster.connect()
Line 81:             self.assertEquals(gluster._mount._options, 
self.MOUNT_OPTIONS)
Line 82:         finally:
Line 83:             fileUtils.cleanupdir(gluster._getLocalPath())
> When we use a fake, we do *not* want to create directories in the real loca
This will be relevant when adding the other tests mentioned in previous comment.


-- 
To view, visit https://gerrit.ovirt.org/40665
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2478a5edc1fc9d24eb96d64a32a98a2467ce2989
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ala Hino <[email protected]>
Gerrit-Reviewer: Ala Hino <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to