diff options
author | kshithijiyer <kshithij.ki@gmail.com> | 2020-02-18 13:21:05 +0530 |
---|---|---|
committer | Bala Konda Reddy M <bala12352@gmail.com> | 2020-02-19 06:07:02 +0000 |
commit | 75898ee995b08892ab4b936094a58d4321fc24a6 (patch) | |
tree | 448d34429fe6fee1534c9f40d8d2f51a2942fda8 /tests/functional/arbiter/brick_cases | |
parent | 26052f310bb977aa1538933b46667a1e9c6ef440 (diff) |
[TestFix] Changing code used to create arbiter volumes
As distributed-arbiter and arbiter weren't present before patch [1],
arbiter and distributed-arbiter volumes were created by the hack show
below where a distributed-replicated or replicated volume's configuration
was modified to create an arbiter volume.
```
@runs_on([['replicated', 'distributed-replicated'],
['glusterfs', 'nfs']])
class TestSelfHeal(GlusterBaseClass):
.................
@classmethod
def setUpClass(cls):
...............
# Overriding the volume type to specifically test the volume
# type Change from distributed-replicated to arbiter
if cls.volume_type == "distributed-replicated":
cls.volume['voltype'] = { 'type': 'distributed-replicated',
'dist_count': 2,
'replica_count': 3,
'arbiter_count': 1,
'transport': 'tcp'}
```
Now this code is to be updated where we need to remove code which
was used to override volume configuration and
just add arbiter or distributed-arbiter in `@runs_on([],[])`
as shown below:
```
@runs_on([['replicated', 'distributed-arbiter'],
['glusterfs', 'nfs']])
class TestSelfHeal(GlusterBaseClass):
```
Links:
[1] https://github.com/gluster/glusto-tests/commit/08b727842bc66603e3b8d1160ee4b15051b0cd20
Change-Id: I4c44c2f3506bd0183fd991354fb723f8ec235a4b
Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
Diffstat (limited to 'tests/functional/arbiter/brick_cases')
4 files changed, 6 insertions, 46 deletions
diff --git a/tests/functional/arbiter/brick_cases/test_brickcases.py b/tests/functional/arbiter/brick_cases/test_brickcases.py index 46be47ca9..2b006cb92 100755 --- a/tests/functional/arbiter/brick_cases/test_brickcases.py +++ b/tests/functional/arbiter/brick_cases/test_brickcases.py @@ -33,7 +33,7 @@ from glustolibs.io.utils import (validate_io_procs, from glustolibs.misc.misc_libs import upload_scripts
-@runs_on([['replicated', 'distributed-replicated'],
+@runs_on([['arbiter', 'distributed-arbiter'],
['glusterfs', 'cifs', 'nfs']])
class GlusterArbiterVolumeTypeChangeClass(GlusterBaseClass):
"""Class for testing Volume Type Change from replicated to
@@ -44,22 +44,6 @@ class GlusterArbiterVolumeTypeChangeClass(GlusterBaseClass): # Calling GlusterBaseClass setUpClass
cls.get_super_method(cls, 'setUpClass')()
- # Overriding the volume type to specifically test the volume type
- # change from replicated to arbiter
- if cls.volume_type == "replicated":
- cls.volume['voltype'] = {
- 'type': 'replicated',
- 'replica_count': 2,
- 'dist_count': 1,
- 'transport': 'tcp'}
-
- if cls.volume_type == "distributed-replicated":
- cls.volume['voltype'] = {
- 'type': 'distributed-replicated',
- 'dist_count': 2,
- 'replica_count': 2,
- 'transport': 'tcp'}
-
# Upload io scripts for running IO on mounts
g.log.info("Upload io scripts to clients %s for running IO on mounts",
cls.clients)
diff --git a/tests/functional/arbiter/brick_cases/test_impact_of_replace_brick_for_glustershd.py b/tests/functional/arbiter/brick_cases/test_impact_of_replace_brick_for_glustershd.py index 9e4cfee46..56d2edbd9 100644 --- a/tests/functional/arbiter/brick_cases/test_impact_of_replace_brick_for_glustershd.py +++ b/tests/functional/arbiter/brick_cases/test_impact_of_replace_brick_for_glustershd.py @@ -1,4 +1,4 @@ -# Copyright (C) 2016-2017 Red Hat, Inc. <http://www.redhat.com> +# Copyright (C) 2016-2020 Red Hat, Inc. <http://www.redhat.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -30,7 +30,7 @@ from glustolibs.gluster.heal_libs import (get_self_heal_daemon_pid, is_shd_daemonized) -@runs_on([['replicated', 'distributed-replicated'], +@runs_on([['arbiter', 'distributed-arbiter'], ['glusterfs', 'nfs']]) class ImpactOfReplaceBrickForGlustershdTests(GlusterBaseClass): """ @@ -42,17 +42,6 @@ class ImpactOfReplaceBrickForGlustershdTests(GlusterBaseClass): def setUpClass(cls): # Calling GlusterBaseClass setUpClass cls.get_super_method(cls, 'setUpClass')() - - # Override Volumes - if cls.volume_type == "distributed-replicated": - # Define distributed-replicated volume - cls.volume['voltype'] = { - 'type': 'distributed-replicated', - 'dist_count': 2, - 'replica_count': 3, - 'arbiter_count': 1, - 'transport': 'tcp'} - cls.glustershd = "/var/lib/glusterd/glustershd/glustershd-server.vol" def setUp(self): diff --git a/tests/functional/arbiter/brick_cases/test_replica3_to_arbiter.py b/tests/functional/arbiter/brick_cases/test_replica3_to_arbiter.py index 167098c06..947c6eef7 100755 --- a/tests/functional/arbiter/brick_cases/test_replica3_to_arbiter.py +++ b/tests/functional/arbiter/brick_cases/test_replica3_to_arbiter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2018 Red Hat, Inc. <http://www.redhat.com>
+# Copyright (C) 2015-2020 Red Hat, Inc. <http://www.redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -30,19 +30,6 @@ class GlusterArbiterVolumeTypeClass(GlusterBaseClass): """Class for testing Volume Type Change from replicated to
Arbitered volume
"""
- @classmethod
- def setUpClass(cls):
- # Calling GlusterBaseClass setUpClass
- cls.get_super_method(cls, 'setUpClass')()
-
- # Overriding the volume type to specifically test the volume type
-
- if cls.volume_type == "replicated":
- cls.volume['voltype'] = {
- 'type': 'replicated',
- 'replica_count': 3,
- 'transport': 'tcp'}
-
def setUp(self):
"""
Setup Volume
diff --git a/tests/functional/arbiter/brick_cases/test_rmvrf_files.py b/tests/functional/arbiter/brick_cases/test_rmvrf_files.py index 6ea71eaa2..80bd05b86 100755 --- a/tests/functional/arbiter/brick_cases/test_rmvrf_files.py +++ b/tests/functional/arbiter/brick_cases/test_rmvrf_files.py @@ -1,4 +1,4 @@ -# Copyright (C) 2017-2018 Red Hat, Inc. <http://www.redhat.com> +# Copyright (C) 2017-2020 Red Hat, Inc. <http://www.redhat.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ from glustolibs.io.utils import (validate_io_procs, from glustolibs.misc.misc_libs import upload_scripts -@runs_on([['replicated', 'distributed-replicated'], +@runs_on([['arbiter', 'distributed-arbiter'], ['glusterfs', 'cifs', 'nfs']]) class TestRmrfMount(GlusterBaseClass): """ |