summaryrefslogtreecommitdiffstats
path: root/tests/functional/glusterd
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2018-07-03 00:45:30 +0300
committerNigel Babu <nigelb@redhat.com>2018-07-17 04:14:01 +0000
commit02dbb7a68f828863e5b71dc15488e665d484ab6e (patch)
tree4ae10586c3f26f9e73a6d533bbd4af88094c6ef5 /tests/functional/glusterd
parent87f9679588c54c550447acdc8f0cc15626c7d881 (diff)
Shorten all the logs around verify_io_procs
No functional change, just make the tests a bit more readable. It could be moved to a decorator later on, wrapping tests. Change-Id: I484bb8b46907ee8f33dfcf4c960737a21819cd6a Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'tests/functional/glusterd')
-rw-r--r--tests/functional/glusterd/test_brick_log_messages.py7
-rw-r--r--tests/functional/glusterd/test_create_vol_with_used_bricks.py7
-rw-r--r--tests/functional/glusterd/test_readonly_option_on_volume.py17
-rw-r--r--tests/functional/glusterd/test_rebalance_hang.py2
-rw-r--r--tests/functional/glusterd/test_remove_brick_after_restart_glusterd.py2
-rw-r--r--tests/functional/glusterd/test_restart_glusterd_while_rebalancing.py8
-rw-r--r--tests/functional/glusterd/test_volume_status.py2
-rw-r--r--tests/functional/glusterd/test_volume_status_fd.py7
8 files changed, 25 insertions, 27 deletions
diff --git a/tests/functional/glusterd/test_brick_log_messages.py b/tests/functional/glusterd/test_brick_log_messages.py
index b21ab6770..d1f8f2fb5 100644
--- a/tests/functional/glusterd/test_brick_log_messages.py
+++ b/tests/functional/glusterd/test_brick_log_messages.py
@@ -118,9 +118,10 @@ class TestAddBrickFunctionality(GlusterBaseClass):
self.counter = self.counter + 10
# Validate IO
- ret = validate_io_procs(self.all_mounts_procs, self.mounts)
- self.assertTrue(ret, "IO failed on some of the clients")
- g.log.info("IO is successful on all mounts")
+ self.assertTrue(
+ validate_io_procs(self.all_mounts_procs, self.mounts),
+ "IO failed on some of the clients"
+ )
# Getting timestamp
_, timestamp, _ = g.run_local('date +%s')
diff --git a/tests/functional/glusterd/test_create_vol_with_used_bricks.py b/tests/functional/glusterd/test_create_vol_with_used_bricks.py
index edd477b6f..940d7a451 100644
--- a/tests/functional/glusterd/test_create_vol_with_used_bricks.py
+++ b/tests/functional/glusterd/test_create_vol_with_used_bricks.py
@@ -134,9 +134,10 @@ class TestCreateVolWithUsedBricks(GlusterBaseClass):
self.counter = self.counter + 10
# Validate IO
- ret = validate_io_procs(self.all_mounts_procs, self.mounts)
- self.assertTrue(ret, "IO failed on some of the clients")
- g.log.info("IO is successful on all mounts")
+ self.assertTrue(
+ validate_io_procs(self.all_mounts_procs, self.mounts),
+ "IO failed on some of the clients"
+ )
# Unmount volume
ret = self.unmount_volume(self.mounts)
diff --git a/tests/functional/glusterd/test_readonly_option_on_volume.py b/tests/functional/glusterd/test_readonly_option_on_volume.py
index 09e0b4378..064d1ac8a 100644
--- a/tests/functional/glusterd/test_readonly_option_on_volume.py
+++ b/tests/functional/glusterd/test_readonly_option_on_volume.py
@@ -114,10 +114,11 @@ class TestReadOnlyOptionOnVolume(GlusterBaseClass):
self.counter = self.counter + 10
# Validate IO
- g.log.info("Wait for IO to complete and validate IO ...")
- ret = validate_io_procs(self.all_mounts_procs, self.mounts)
- self.assertFalse(ret, "IO should fail on mount points of readonly "
- "volumes but IO success")
+ self.assertFalse(
+ validate_io_procs(self.all_mounts_procs, self.mounts),
+ "IO should fail on mount points of readonly "
+ "volumes but IO succeeded"
+ )
g.log.info("IO failed on mount points of read only volumes "
"as expected")
@@ -150,7 +151,7 @@ class TestReadOnlyOptionOnVolume(GlusterBaseClass):
self.counter = self.counter + 10
# Validate IO
- g.log.info("Wait for IO to complete and validate IO ...")
- ret = validate_io_procs(self.all_mounts_procs, self.mounts)
- self.assertTrue(ret, "IO failed on some of the clients")
- g.log.info("IO is successful on all mounts")
+ self.assertTrue(
+ validate_io_procs(self.all_mounts_procs, self.mounts),
+ "IO failed on some of the clients"
+ )
diff --git a/tests/functional/glusterd/test_rebalance_hang.py b/tests/functional/glusterd/test_rebalance_hang.py
index 8dde6d7d5..d96a4043a 100644
--- a/tests/functional/glusterd/test_rebalance_hang.py
+++ b/tests/functional/glusterd/test_rebalance_hang.py
@@ -152,11 +152,9 @@ class TestRebalanceHang(GlusterBaseClass):
self.all_mounts_procs.append(proc)
self.io_validation_complete = False
# Validate IO
- g.log.info("Wait for IO to complete and validate IO ...")
ret = validate_io_procs(self.all_mounts_procs, self.mounts)
self.io_validation_complete = True
self.assertTrue(ret, "IO failed on some of the clients")
- g.log.info("IO is successful on all mounts")
g.log.info("Starting rebalance with force on the volume")
ret, _, _ = rebalance_start(self.mnode, self.volname, False, True)
diff --git a/tests/functional/glusterd/test_remove_brick_after_restart_glusterd.py b/tests/functional/glusterd/test_remove_brick_after_restart_glusterd.py
index e1d7b3522..217eae5dc 100644
--- a/tests/functional/glusterd/test_remove_brick_after_restart_glusterd.py
+++ b/tests/functional/glusterd/test_remove_brick_after_restart_glusterd.py
@@ -150,11 +150,9 @@ class TestRemoveBrickAfterRestartGlusterd(GlusterBaseClass):
self.all_mounts_procs.append(proc)
self.io_validation_complete = False
# Validate IO
- g.log.info("Wait for IO to complete and validate IO ...")
ret = validate_io_procs(self.all_mounts_procs, self.mounts)
self.io_validation_complete = True
self.assertTrue(ret, "IO failed on some of the clients")
- g.log.info("IO is successful on all mounts")
remove_brick_list = bricks_list[2:4]
ret, _, _ = remove_brick(self.mnode, self.volname, remove_brick_list,
diff --git a/tests/functional/glusterd/test_restart_glusterd_while_rebalancing.py b/tests/functional/glusterd/test_restart_glusterd_while_rebalancing.py
index 2f68dbf38..22aee4e3e 100644
--- a/tests/functional/glusterd/test_restart_glusterd_while_rebalancing.py
+++ b/tests/functional/glusterd/test_restart_glusterd_while_rebalancing.py
@@ -125,10 +125,10 @@ class TestRestartGlusterdWhileRebalance(GlusterBaseClass):
self.counter = self.counter + 10
# Validate IO
- g.log.info("Wait for IO to complete and validate IO ...")
- ret = validate_io_procs(self.all_mounts_procs, self.mounts)
- self.assertTrue(ret, "IO failed on some of the clients")
- g.log.info("IO is successful on all mounts")
+ self.assertTrue(
+ validate_io_procs(self.all_mounts_procs, self.mounts),
+ "IO failed on some of the clients"
+ )
# Forming brick list
brick_list = form_bricks_list_to_add_brick(
diff --git a/tests/functional/glusterd/test_volume_status.py b/tests/functional/glusterd/test_volume_status.py
index acfceb23b..ff5d5752f 100644
--- a/tests/functional/glusterd/test_volume_status.py
+++ b/tests/functional/glusterd/test_volume_status.py
@@ -158,11 +158,9 @@ class VolumeStatusWhenIOInProgress(GlusterBaseClass):
"'inode' of volume %s", self.volname)
# Validate IO
- g.log.info("Wait for IO to complete and validate IO ...")
ret = validate_io_procs(self.all_mounts_procs, self.mounts)
self.io_validation_complete = True
self.assertTrue(ret, "IO failed on some of the clients")
- g.log.info("IO is successful on all mounts")
# List all files and dirs created
g.log.info("List all files and directories:")
diff --git a/tests/functional/glusterd/test_volume_status_fd.py b/tests/functional/glusterd/test_volume_status_fd.py
index f06369633..2765325c5 100644
--- a/tests/functional/glusterd/test_volume_status_fd.py
+++ b/tests/functional/glusterd/test_volume_status_fd.py
@@ -140,10 +140,11 @@ class VolumeStatusFdWhenIOInProgress(GlusterBaseClass):
count += 1
# Validate IO
- ret = validate_io_procs(self.all_mounts_procs, self.mounts)
- self.assertTrue(ret, "IO failed on some of the clients")
+ self.assertTrue(
+ validate_io_procs(self.all_mounts_procs, self.mounts),
+ "IO failed on some of the clients"
+ )
self.io_validation_complete = True
- g.log.info("IO is successful on all mounts")
# List all files and dirs created
g.log.info("List all files and directories:")