summaryrefslogtreecommitdiffstats
path: root/tests/functional/snapshot
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/snapshot
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/snapshot')
-rw-r--r--tests/functional/snapshot/test_mount_snap.py23
-rw-r--r--tests/functional/snapshot/test_restore_online_vol.py8
-rw-r--r--tests/functional/snapshot/test_snap_delete_existing_scheduler.py8
-rw-r--r--tests/functional/snapshot/test_snap_delete_original_volume.py8
-rw-r--r--tests/functional/snapshot/test_snap_uss.py9
-rw-r--r--tests/functional/snapshot/test_snap_uss_while_io.py8
-rw-r--r--tests/functional/snapshot/test_uss_brick_down.py8
-rw-r--r--tests/functional/snapshot/test_uss_snap_active_deactive.py8
-rw-r--r--tests/functional/snapshot/test_validate_snaps_dir_over_uss.py14
9 files changed, 48 insertions, 46 deletions
diff --git a/tests/functional/snapshot/test_mount_snap.py b/tests/functional/snapshot/test_mount_snap.py
index fa56572..e01be9d 100644
--- a/tests/functional/snapshot/test_mount_snap.py
+++ b/tests/functional/snapshot/test_mount_snap.py
@@ -93,10 +93,10 @@ class TestSnapMountSnapshot(GlusterBaseClass):
all_mounts_procs.append(proc)
# Validate I/O
- g.log.info("Wait for IO to complete and validate IO.....")
- ret = validate_io_procs(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(all_mounts_procs, self.mounts),
+ "IO failed on some of the clients"
+ )
# Creating snapshot
g.log.info("Starting to create snapshots")
@@ -157,10 +157,10 @@ class TestSnapMountSnapshot(GlusterBaseClass):
all_mounts_procs.append(proc)
# Validate I/O
- g.log.info("Wait for IO to complete and validate IO.....")
- ret = validate_io_procs(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(all_mounts_procs, self.mounts),
+ "IO failed on some of the clients"
+ )
# start I/O
g.log.info("Starting IO on all mounts...")
@@ -175,9 +175,10 @@ class TestSnapMountSnapshot(GlusterBaseClass):
all_mounts_procs.append(proc)
# validate io should fail
- g.log.info("Wait for IO to complete and validate IO.....")
- ret = validate_io_procs(all_mounts_procs, self.mounts)
- self.assertFalse(ret, "Unexpected: IO Successfull on all clients")
+ self.assertFalse(
+ validate_io_procs(all_mounts_procs, self.mounts),
+ "Unexpected: IO Successfull on all clients"
+ )
g.log.info("Expected: IO failed on clients")
def tearDown(self):
diff --git a/tests/functional/snapshot/test_restore_online_vol.py b/tests/functional/snapshot/test_restore_online_vol.py
index 9df2dde..023e9ea 100644
--- a/tests/functional/snapshot/test_restore_online_vol.py
+++ b/tests/functional/snapshot/test_restore_online_vol.py
@@ -118,11 +118,11 @@ class SnapRSOnline(GlusterBaseClass):
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.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("I/O successful on clients")
# Get stat of all the files/dirs created.
g.log.info("Get stat of all the files/dirs created.")
diff --git a/tests/functional/snapshot/test_snap_delete_existing_scheduler.py b/tests/functional/snapshot/test_snap_delete_existing_scheduler.py
index bce21ea..436e7f2 100644
--- a/tests/functional/snapshot/test_snap_delete_existing_scheduler.py
+++ b/tests/functional/snapshot/test_snap_delete_existing_scheduler.py
@@ -223,10 +223,10 @@ class SnapshotDeleteExistingScheduler(GlusterBaseClass):
self.job_name)
# Validate IO
- g.log.info("Validating IO on mounts")
- ret = validate_io_procs(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(all_mounts_procs, self.mounts),
+ "IO failed on some of the clients"
+ )
# scheduler list (no active jobs should be there)
g.log.info("Starting to list all scheduler jobs")
diff --git a/tests/functional/snapshot/test_snap_delete_original_volume.py b/tests/functional/snapshot/test_snap_delete_original_volume.py
index 97daed8..1bf62fd 100644
--- a/tests/functional/snapshot/test_snap_delete_original_volume.py
+++ b/tests/functional/snapshot/test_snap_delete_original_volume.py
@@ -97,11 +97,11 @@ class SnapshotSelfheal(GlusterBaseClass):
self.io_validation_complete = False
# Validate IO
- g.log.info("Wait for IO to complete and validate IO ...")
- ret = validate_io_procs(all_mounts_procs, self.mounts)
- self.assertTrue(ret, "IO failed on some of the clients")
+ self.assertTrue(
+ validate_io_procs(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")
# Creating snapshot
g.log.info("Starting to Create snapshot")
diff --git a/tests/functional/snapshot/test_snap_uss.py b/tests/functional/snapshot/test_snap_uss.py
index dcc195f..aad6d89 100644
--- a/tests/functional/snapshot/test_snap_uss.py
+++ b/tests/functional/snapshot/test_snap_uss.py
@@ -97,11 +97,10 @@ class SnapshotUssSnap(GlusterBaseClass):
all_mounts_procs.append(proc)
# Validate IO
- g.log.info("Validating IO on mounts")
- g.log.info("%s", all_mounts_procs)
- ret = validate_io_procs(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(all_mounts_procs, self.mounts),
+ "IO failed on some of the clients"
+ )
# starting I/O
g.log.info("Starting IO on all mounts...")
diff --git a/tests/functional/snapshot/test_snap_uss_while_io.py b/tests/functional/snapshot/test_snap_uss_while_io.py
index 990fadd..e8435c5 100644
--- a/tests/functional/snapshot/test_snap_uss_while_io.py
+++ b/tests/functional/snapshot/test_snap_uss_while_io.py
@@ -164,11 +164,11 @@ class SnapshotUssWhileIo(GlusterBaseClass):
g.log.info("snapshot %s activated successfully", self.snap)
# Validate IO is completed
- g.log.info("Wait for IO to complete and validate IO ...")
- ret = validate_io_procs(all_mounts_procs, self.mounts)
- self.assertTrue(ret, "IO failed on some of the clients")
+ self.assertTrue(
+ validate_io_procs(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")
# validate snapshots are listed under .snaps directory
g.log.info("Validating snaps under .snaps")
diff --git a/tests/functional/snapshot/test_uss_brick_down.py b/tests/functional/snapshot/test_uss_brick_down.py
index bb0dadf..94b48c0 100644
--- a/tests/functional/snapshot/test_uss_brick_down.py
+++ b/tests/functional/snapshot/test_uss_brick_down.py
@@ -130,11 +130,11 @@ class SnapUssBrickDown(GlusterBaseClass):
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.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("I/O successful on clients")
# Bring down 1 brick from brick list
g.log.info("Getting all the bricks of the volume")
diff --git a/tests/functional/snapshot/test_uss_snap_active_deactive.py b/tests/functional/snapshot/test_uss_snap_active_deactive.py
index db7f8ab..40832e7 100644
--- a/tests/functional/snapshot/test_uss_snap_active_deactive.py
+++ b/tests/functional/snapshot/test_uss_snap_active_deactive.py
@@ -137,11 +137,11 @@ class SnapUssActiveD(GlusterBaseClass):
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.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("I/O successful on clients")
# Enable USS
g.log.info("Enable USS on volume")
diff --git a/tests/functional/snapshot/test_validate_snaps_dir_over_uss.py b/tests/functional/snapshot/test_validate_snaps_dir_over_uss.py
index 5b91f8b..8fcce00 100644
--- a/tests/functional/snapshot/test_validate_snaps_dir_over_uss.py
+++ b/tests/functional/snapshot/test_validate_snaps_dir_over_uss.py
@@ -139,11 +139,11 @@ class TestValidateUss(GlusterBaseClass):
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.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("I/O successful on clients")
# get the snapshot list.
snap_list = get_snap_list(self.mnode)
@@ -212,8 +212,10 @@ class TestValidateUss(GlusterBaseClass):
# IO should fail
g.log.info("IO should Fail with ROFS error.....")
- ret = validate_io_procs(all_mounts_procs, self.mounts)
- self.assertFalse(ret, "Unexpected: IO successfully completed")
+ self.assertFalse(
+ validate_io_procs(all_mounts_procs, self.mounts),
+ "Unexpected: IO successfully completed"
+ )
g.log.info("Expected: IO failed to complete")
# validate snap-0 present in mountpoint