summaryrefslogtreecommitdiffstats
path: root/tests/functional/dht
diff options
context:
space:
mode:
authorNigel Babu <nigelb@redhat.com>2018-03-05 15:49:23 +0530
committerNigel Babu <nigelb@redhat.com>2018-03-27 16:05:15 +0530
commitfb5145be2db1a7c96b008af8a40e3b7b18df9673 (patch)
tree3ca087e0996bfd975e97b4f0235421a37d2e4767 /tests/functional/dht
parent8804c9499e9ed0d37823dc55d03eb7792907cf0b (diff)
Fix up coding style issues in tests
Change-Id: I14609030983d4485dbce5a4ffed1e0353e3d1bc7
Diffstat (limited to 'tests/functional/dht')
-rw-r--r--tests/functional/dht/__init__.py0
-rw-r--r--tests/functional/dht/test_negative_exercise_add_brick_command.py12
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/functional/dht/__init__.py b/tests/functional/dht/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/functional/dht/__init__.py
diff --git a/tests/functional/dht/test_negative_exercise_add_brick_command.py b/tests/functional/dht/test_negative_exercise_add_brick_command.py
index 69caf3d..0824b1f 100644
--- a/tests/functional/dht/test_negative_exercise_add_brick_command.py
+++ b/tests/functional/dht/test_negative_exercise_add_brick_command.py
@@ -19,6 +19,7 @@
from glusto.core import Glusto as g
from glustolibs.gluster.gluster_base_class import (GlusterBaseClass,
runs_on)
+# pylint: disable=no-name-in-module
from glustolibs.gluster.volume_libs import (form_bricks_list_to_add_brick,
get_subvols, setup_volume,
cleanup_volume)
@@ -61,7 +62,7 @@ class ExerciseAddbrickCommand(GlusterBaseClass):
ret = cleanup_volume(self.mnode, volume)
if not ret:
raise ExecutionError("Unable to delete volume % s" % volume)
- g.log.info("Volume deleted successfully : %s" % volume)
+ g.log.info("Volume deleted successfully : %s", volume)
# Calling GlusterBaseClass tearDown
GlusterBaseClass.tearDown.im_func(self)
@@ -73,8 +74,7 @@ class ExerciseAddbrickCommand(GlusterBaseClass):
self.servers,
self.all_servers_info)
cmd = ("gluster volume add-brick %s " % (' '.join(bricks_list)))
- g.log.info("Adding bricks without specifying volume name",
- self.volname)
+ g.log.info("Adding bricks without specifying volume name")
_, _, err = g.run(self.mnode, cmd)
self.assertIn("does not exist", err, "add-brick is successful")
g.log.info("Volume add-brick failed with error %s ", err)
@@ -127,7 +127,7 @@ class ExerciseAddbrickCommand(GlusterBaseClass):
bricks_list = get_subvols(self.mnode,
self.volname)['volume_subvols'][0]
for (i, item) in enumerate(bricks_list):
- server, bricks = item.split(":")
+ server, _ = item.split(":")
item.replace(server, "abc.def.ghi.jkl")
bricks_list[i] = item.replace(server, "abc.def.ghi.jkl")
g.log.info("Adding bricks to the volume %s from the host which is not"
@@ -155,8 +155,8 @@ class AddBrickAlreadyPartOfAnotherVolume(GlusterBaseClass):
for volume in vol_list:
ret = cleanup_volume(self.mnode, volume)
if not ret:
- raise ExecutionError("Unable to delete volume % s" % volume)
- g.log.info("Volume deleted successfully : %s" % volume)
+ raise ExecutionError("Unable to delete volume %s" % volume)
+ g.log.info("Volume deleted successfully : %s", volume)
GlusterBaseClass.tearDown.im_func(self)