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(id="id", spec="192.168.122.1:/music") gluster.validate()
def test_validate(self, monkeypatch): monkeypatch.setattr(storageServer, 'supervdsm', FakeSupervdsm()) monkeypatch.setattr(gluster_cli, 'exists', lambda: True) storageServer.supervdsm.glusterVolumeInfo = self.glusterVolumeInfo gluster = GlusterFSConnection(id="id", spec="192.168.122.1:/music") gluster.validate()
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(id="id", spec="192.168.122.1:/music") gluster.validate()
def test_allowed_gluster_replica_count(self, monkeypatch, replica_count): monkeypatch.setattr(storageServer, 'supervdsm', FakeSupervdsm()) monkeypatch.setattr(GlusterFSConnection, 'ALLOWED_REPLICA_COUNTS', ('1', '3')) def glusterVolumeInfo(volumeName=None, remoteServer=None): return { 'music': { 'replicaCount': replica_count, 'volumeType': 'REPLICATE' } } storageServer.supervdsm.glusterVolumeInfo = glusterVolumeInfo gluster = GlusterFSConnection(id="id", spec="192.168.122.1:/music") gluster.validate()
def test_validate(self): storageServer.supervdsm.glusterVolumeInfo = self.glusterVolumeInfo gluster = GlusterFSConnection(id="id", spec="192.168.122.1:/music") gluster.validate()
def test_validate(self): storageServer.supervdsm.glusterVolumeInfo = self.glusterVolumeInfo gluster = GlusterFSConnection(id="id", spec="192.168.122.1:/music") gluster.validate()