def test_allowed_gluster_replica_count(self, replica_count): def glusterVolumeInfo(volumeName=None, remoteServer=None): return {'music': {'replicaCount': replica_count}} storageServer.supervdsm.glusterVolumeInfo = glusterVolumeInfo gluster = GlusterFSConnection(spec="192.168.122.1:/music") gluster.validate()
def test_allowed_gluster_replica_count(self, replica_count, supported): def glusterVolumeInfo(volumeName=None, remoteServer=None): return {'music': {'replicaCount': replica_count}} storageServer.supervdsm.glusterVolumeInfo = glusterVolumeInfo gluster = GlusterFSConnection(spec="192.168.122.1:/music") if supported: gluster.validate() else: self.assertRaises(se.UnsupportedGlusterVolumeReplicaCountError, gluster.validate)
def test_validate(self): storageServer.supervdsm.glusterVolumeInfo = self.glusterVolumeInfo gluster = GlusterFSConnection(spec="192.168.122.1:/music") gluster.validate()