diff options
author | kshithijiyer <kshithij.ki@gmail.com> | 2020-08-13 23:28:36 +0530 |
---|---|---|
committer | Arthy Loganathan <aloganat@redhat.com> | 2020-08-17 05:03:05 +0000 |
commit | 30c45e121dbb2d7da289328e8a76111691a44f46 (patch) | |
tree | 1f79cae2aae7beae063735c821b831bd267401f2 /tests/functional/dht/test_volume_start_stop_while_rebalance_in_progress.py | |
parent | fdc21887a9675699e2beeecec40fa9fa68a298d1 (diff) |
[Testfix] Change g.log.error() to self.assertTrue()
Problem:
Testcases test_volume_start_stop_while_rebalance_is_in_progress throws
the below traceback when run:
```
Traceback (most recent call last):
File "/usr/lib64/python2.7/logging/__init__.py", line 851, in emit
msg = self.format(record)
File "/usr/lib64/python2.7/logging/__init__.py", line 724, in format
return fmt.format(record)
File "/usr/lib64/python2.7/logging/__init__.py", line 464, in format
record.message = record.getMessage()
File "/usr/lib64/python2.7/logging/__init__.py", line 328, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Logged from file test_volume_start_stop_while_rebalance_in_progress.py, line 135
```
This is because g.log.error() was used instead of
self.assertTrue().
Solution:
Changing to self.assertTrue().
Change-Id: If926eb834c0128a4e507da9fdd805916196432cb
Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
Diffstat (limited to 'tests/functional/dht/test_volume_start_stop_while_rebalance_in_progress.py')
-rw-r--r-- | tests/functional/dht/test_volume_start_stop_while_rebalance_in_progress.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/functional/dht/test_volume_start_stop_while_rebalance_in_progress.py b/tests/functional/dht/test_volume_start_stop_while_rebalance_in_progress.py index 0bec68b8f..55099c811 100644 --- a/tests/functional/dht/test_volume_start_stop_while_rebalance_in_progress.py +++ b/tests/functional/dht/test_volume_start_stop_while_rebalance_in_progress.py @@ -131,8 +131,8 @@ class RebalanceValidation(GlusterBaseClass): # Log Volume Info and Status before expanding the volume. g.log.info("Logging volume info and Status before expanding volume") ret = log_volume_info_and_status(self.mnode, self.volname) - g.log.error(ret, ("Logging volume info and status failed on " - "volume %s", self.volname)) + self.assertTrue(ret, ("Logging volume info and status failed on " + "volume %s", self.volname)) g.log.info("Logging volume info and status was successful for volume " "%s", self.volname) |