diff options
author | Bala Konda Reddy M <bala12352@gmail.com> | 2020-08-17 16:11:38 +0530 |
---|---|---|
committer | Bala Konda Reddy M <bala12352@gmail.com> | 2020-08-18 05:58:43 +0000 |
commit | 81440d1bab4d43785b37d285877b235ddd9ac6b6 (patch) | |
tree | 890ba5879f4188b4ee46ad897c443e1c55a7f903 /tests/functional/authentication/test_verify_auth_reject_precedence.py | |
parent | 891472d8b77574dbb3346b98bb0948e0f2d12a2c (diff) |
[Testfix] Remove redundant logging - Part 1
Problem:
In most of the testcases due to redundant logging,
the performance of the whole suite completion time
is affected.
Solution:
Currently there are 100+ g.log.info statements in the
authentincation suite and half of them are redundant.
Removed the g.log.info statements whereever it is not
required. After the changes the g.log.info statements
are around 50 and not removed the statements to reduce
the number of lines but for the improvement of the
whole suite.
Modified few line indents as well and added teardown
for the missing files.
Note: Will be submitting for each components separately
Change-Id: I63973e115dd5dbbc7fc9462978397e7915181265
Signed-off-by: Bala Konda Reddy M <bala12352@gmail.com>
Diffstat (limited to 'tests/functional/authentication/test_verify_auth_reject_precedence.py')
-rw-r--r-- | tests/functional/authentication/test_verify_auth_reject_precedence.py | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/tests/functional/authentication/test_verify_auth_reject_precedence.py b/tests/functional/authentication/test_verify_auth_reject_precedence.py index d51e61443..ce8420690 100644 --- a/tests/functional/authentication/test_verify_auth_reject_precedence.py +++ b/tests/functional/authentication/test_verify_auth_reject_precedence.py @@ -28,8 +28,7 @@ from glustolibs.gluster.auth_ops import set_auth_allow, set_auth_reject @runs_on([['replicated', 'distributed', 'distributed-replicated', - 'dispersed', 'distributed-dispersed'], - ['glusterfs']]) + 'dispersed', 'distributed-dispersed'], ['glusterfs']]) class VerifyAuthRejectPrecedence(GlusterBaseClass): """ Tests to verify auth.reject precedence over auth.allow option. @@ -41,13 +40,10 @@ class VerifyAuthRejectPrecedence(GlusterBaseClass): """ cls.get_super_method(cls, 'setUpClass')() # Create and start volume - g.log.info("Starting volume setup process %s", cls.volname) ret = cls.setup_volume() if not ret: raise ExecutionError("Failed to setup " "and start volume %s" % cls.volname) - g.log.info("Successfully created and started the volume: %s", - cls.volname) def authenticated_mount(self, mount_obj): """ @@ -182,14 +178,12 @@ class VerifyAuthRejectPrecedence(GlusterBaseClass): auth_dict = {'all': ['*']} ret = set_auth_reject(self.volname, self.mnode, auth_dict) self.assertTrue(ret, "Failed to set auth.reject volume option.") - g.log.info("Successfully set auth.reject option on volume") # Setting auth.allow on volume for client1 and client2 using ip auth_dict = {'all': [self.mounts[0].client_system, self.mounts[0].client_system]} ret = set_auth_allow(self.volname, self.mnode, auth_dict) self.assertTrue(ret, "Failed to set auth.allow volume option") - g.log.info("Successfully set auth.allow option on volume") # Trying to mount volume on client1 self.unauthenticated_mount(self.mounts[0]) @@ -230,7 +224,6 @@ class VerifyAuthRejectPrecedence(GlusterBaseClass): auth_dict = {'all': [hostname_client1, hostname_client2]} ret = set_auth_allow(self.volname, self.mnode, auth_dict) self.assertTrue(ret, "Failed to set auth.allow volume option") - g.log.info("Successfully set auth.allow option on volume") # Trying to mount volume on client1 self.unauthenticated_mount(self.mounts[0]) @@ -255,14 +248,12 @@ class VerifyAuthRejectPrecedence(GlusterBaseClass): auth_dict = {'/d1': ['*']} ret = set_auth_reject(self.volname, self.mnode, auth_dict) self.assertTrue(ret, "Failed to set auth.reject volume option.") - g.log.info("Successfully set auth.reject option.") # Setting auth.allow on d1 for client1 and client2 using ip auth_dict = {'/d1': [self.mounts[0].client_system, self.mounts[1].client_system]} ret = set_auth_allow(self.volname, self.mnode, auth_dict) self.assertTrue(ret, "Failed to set auth.allow volume option") - g.log.info("Successfully set auth.allow option.") # Creating mount object for sub-directory mount on client1 mount_obj_client1 = copy.deepcopy(self.mounts[0]) @@ -296,7 +287,6 @@ class VerifyAuthRejectPrecedence(GlusterBaseClass): auth_dict = {'/d1': [hostname_client1, hostname_client2]} ret = set_auth_allow(self.volname, self.mnode, auth_dict) self.assertTrue(ret, "Failed to set auth.allow volume option") - g.log.info("Successfully set auth.allow option.") # Trying to mount d1 on client1 self.unauthenticated_mount(mount_obj_client1) @@ -320,8 +310,9 @@ class VerifyAuthRejectPrecedence(GlusterBaseClass): """ Cleanup volume """ - g.log.info("Cleaning up volume") ret = self.cleanup_volume() if not ret: raise ExecutionError("Failed to cleanup volume.") - g.log.info("Volume cleanup was successful.") + + # Calling GlusterBaseClass tearDown + self.get_super_method(self, 'tearDown')() |