From 3ee9a70402764f21dbea387aa75d81999b224beb Mon Sep 17 00:00:00 2001 From: Thiago da Silva Date: Thu, 23 Jan 2014 13:43:28 -0500 Subject: adding error handling to gswauth-cleanup-tokens tool added input validation for a couple of options and error handling in case a non-existing account name is provided Change-Id: I6d703d584552fc7b7574f34e79ed25a2982b6d5e Signed-off-by: Thiago da Silva Reviewed-on: http://review.gluster.org/6767 Reviewed-by: Prashanth Pai Tested-by: Prashanth Pai Reviewed-by: pushpesh sharma Tested-by: pushpesh sharma Reviewed-by: Chetan Risbud --- test/functional_auth/gswauth/test_gswauth_cli.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/functional_auth/gswauth/test_gswauth_cli.py b/test/functional_auth/gswauth/test_gswauth_cli.py index 040b577..bc55ed9 100644 --- a/test/functional_auth/gswauth/test_gswauth_cli.py +++ b/test/functional_auth/gswauth/test_gswauth_cli.py @@ -766,15 +766,11 @@ class TestCleanUPToken(unittest.TestCase): #https://bugs.launchpad.net/gluster-swift/+bug/1271550 #cleanup token with token-life option non numeric value (status,output)=Utils.cleanToken(option='token-life', value='notanumaric') - self.assertNotEqual(status, 0, 'clean up success with token-life option token-life non numeric value'+output) - self.assertEqual('ValueError' in output,True, 'clean up \ - success with token-life option non numeric value: '+output) + self.assertEqual('Usage:' in output, True, 'clean up success with token-life option non numeric value'+output) #cleanup token with sleep option non numeric value (status,output)=Utils.cleanToken(option='sleep', value='notanumeric') - self.assertNotEqual(status, 0, 'clean up failed with sleep option non numeric value'+output) - self.assertEqual('ValueError' in output,True, 'clean up \ - success with token-life option non numeric value: '+output) + self.assertEqual('Usage:' in output, True, 'clean up success with sleep option non numeric value'+output) def testSetAccountService(self): self.setTestAccUserEnv() -- cgit