summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster
diff options
context:
space:
mode:
authorkshithijiyer <kshithij.ki@gmail.com>2020-03-03 13:31:36 +0530
committerkshithijiyer <kshithij.ki@gmail.com>2020-03-03 13:31:36 +0530
commit7635a3ba91b5931ddf6a29b6b35498fbe8401c96 (patch)
tree5bacbaf185b08b05be571fcc04ec25ae3c1c8382 /glustolibs-gluster
parent8616ac1e44316ead3fea05e5b2c51d7a97b8eb4a (diff)
[libfix] Fix framework break due to geo_rep patch
Problem: Due to patch [1], the framework broke and was failing for all the testcases with the below backtrace: ``` > mount_dict['server'] = cls.snode E AttributeError: type object 'VolumeAccessibilityTests_cplex_replicated_glusterf' has no attribute 'snode' ``` Solution: This was becasue mnode_slave was accidentally written as snode. And cls.geo_rep_info wasn't a safe condition operator hence changed it to cls.slaves. Testcase results with patch: test_cvt.py::TestGlusterHealSanity_cplex_replicated_glusterfs::test_self_heal_when_io_in_progress PASSED test_cvt.py::TestGlusterExpandVolumeSanity_cplex_distributed-dispersed_glusterfs::test_expanding_volume_when_io_in_progress PASSED test_cvt.py::TestGlusterHealSanity_cplex_dispersed_glusterfs::test_self_heal_when_io_in_progress PASSED test_cvt.py::TestGlusterExpandVolumeSanity_cplex_distributed_nfs::test_expanding_volume_when_io_in_progress PASSED test_cvt.py::TestQuotaSanity_cplex_replicated_nfs::test_quota_enable_disable_enable_when_io_in_progress PASSED test_cvt.py::TestSnapshotSanity_cplex_distributed-dispersed_glusterfs::test_snapshot_basic_commands_when_io_in_progress PASSED test_cvt.py::TestGlusterReplaceBrickSanity_cplex_distributed-replicated_glusterfs::test_replace_brick_when_io_in_progress PASSED test_cvt.py::TestQuotaSanity_cplex_distributed_nfs::test_quota_enable_disable_enable_when_io_in_progress PASSED test_cvt.py::TestGlusterExpandVolumeSanity_cplex_dispersed_glusterfs::test_expanding_volume_when_io_in_progress PASSED test_cvt.py::TestGlusterShrinkVolumeSanity_cplex_distributed-dispersed_glusterfs::test_shrinking_volume_when_io_in_progress PASSED test_cvt.py::TestGlusterExpandVolumeSanity_cplex_dispersed_nfs::test_expanding_volume_when_io_in_progress PASSED test_cvt.py::TestGlusterShrinkVolumeSanity_cplex_distributed_glusterfs::test_shrinking_volume_when_io_in_progress PASSED test_cvt.py::TestGlusterExpandVolumeSanity_cplex_distributed_glusterfs::test_expanding_volume_when_io_in_progress PASSED test_cvt.py::TestQuotaSanity_cplex_dispersed_nfs::test_quota_enable_disable_enable_when_io_in_progress PASSED test_cvt.py::TestSnapshotSanity_cplex_distributed-replicated_glusterfs::test_snapshot_basic_commands_when_io_in_progress PASSED test_cvt.py::TestSnapshotSanity_cplex_dispersed_glusterfs::test_snapshot_basic_commands_when_io_in_progress PASSED test_cvt.py::TestQuotaSanity_cplex_distributed-replicated_glusterfs::test_quota_enable_disable_enable_when_io_in_progress PASSED test_cvt.py::TestSnapshotSanity_cplex_replicated_glusterfs::test_snapshot_basic_commands_when_io_in_progress PASSED test_cvt.py::TestGlusterShrinkVolumeSanity_cplex_distributed-dispersed_nfs::test_shrinking_volume_when_io_in_progress PASSED test_cvt.py::TestGlusterShrinkVolumeSanity_cplex_distributed_nfs::test_shrinking_volume_when_io_in_progress PASSED links: [1] https://review.gluster.org/#/c/glusto-tests/+/24029/ Change-Id: If7b329e232ab61df9f9d38f5491c58693336dd48 Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
Diffstat (limited to 'glustolibs-gluster')
-rw-r--r--glustolibs-gluster/glustolibs/gluster/gluster_base_class.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py b/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
index 57ec9ba..64b5fcb 100644
--- a/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
+++ b/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
@@ -782,7 +782,7 @@ class GlusterBaseClass(TestCase):
cls.vol_options = cls.volume['options']
# Define useful variable for geo-rep volumes.
- if cls.geo_rep_info:
+ if cls.slaves:
# For master volume
cls.master_volume = cls.volume
cls.master_volume['name'] = ('master_testvol_%s'
@@ -849,7 +849,7 @@ class GlusterBaseClass(TestCase):
cls.mounts = create_mount_objs(cls.mounts_dict_list)
# Setting mounts for geo-rep volumes.
- if cls.geo_rep_info:
+ if cls.slaves:
# For master volume mount
cls.master_mounts = cls.mounts
@@ -858,7 +858,7 @@ class GlusterBaseClass(TestCase):
slave_mount_dict_list = deepcopy(cls.mounts_dict_list)
for mount_dict in slave_mount_dict_list:
mount_dict['volname'] = cls.slave_volume
- mount_dict['server'] = cls.snode
+ mount_dict['server'] = cls.mnode_slave
mount_dict['mountpoint'] = path_join(
"/mnt", '_'.join([cls.slave_volname,
cls.mount_type]))