Change in vdsm[master]: gluster: Allow gluster mount with additional servers
nsoffer at redhat.com
nsoffer at redhat.com
Thu May 7 16:55:02 UTC 2015
Nir Soffer has posted comments on this change.
Change subject: gluster: Allow gluster mount with additional servers
......................................................................
Patch Set 1:
(3 comments)
https://gerrit.ovirt.org/#/c/40665/1/tests/glusterStorageServerTests.py
File tests/glusterStorageServerTests.py:
Line 5: class GlusterFSConnectionTests(VdsmTestCase):
Line 6:
Line 7: def testParsingGlusterPath(self):
Line 8: gluster = GlusterFSConnection("10.20.30.40:/my_lovely_vol", "")
Line 9: remotePath = gluster._getGlusterServerAndVolume()
Don't test private methods, this makes it harder to modify the object.
Line 10: self.assertEquals(remotePath[0], "10.20.30.40")
Line 11: self.assertEquals(remotePath[1], "my_lovely_vol")
Line 12:
Line 13: def testPreparingGlusterVolumeInfoCmd(self):
Line 11: self.assertEquals(remotePath[1], "my_lovely_vol")
Line 12:
Line 13: def testPreparingGlusterVolumeInfoCmd(self):
Line 14: gluster = GlusterFSConnection("10.20.30.40:/my_lovely_vol", "")
Line 15: command = gluster._getGlusterVolCmd("10.20.30.40", "my_lovely_vol", "--xml")
Don't test private methods, instead mock execCmd and check if gluster was run correctly.
Line 16: self.assertEquals(command,
Line 17: ['/usr/sbin/gluster',
Line 18: '--mode=script',
Line 19: 'volume',
Line 30: gluster = GlusterFSConnection("10.20.30.40:/my_lovely_vol", "")
Line 31: servers = gluster._getGlusterBackupServersFromVolInfoXml(xml, "10.35.160.202")
Line 32: self.assertEquals(servers, ["10.35.160.6", "10.35.160.203"])
Line 33:
Line 34: backupOpts = gluster._getGlusterBackupServersOption(servers)
Don't test private methods
--
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: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list