summaryrefslogtreecommitdiffstats
path: root/test/functional_auth/gswauth
diff options
context:
space:
mode:
authorThiago da Silva <thiago@redhat.com>2014-01-23 13:43:28 -0500
committerChetan Risbud <crisbud@redhat.com>2014-02-05 06:23:04 -0800
commit3ee9a70402764f21dbea387aa75d81999b224beb (patch)
treeefb73e2ba522b97a5a9300a267188b7ac86bf891 /test/functional_auth/gswauth
parentec2c548af9067e73e9e6c6a34a1438a3ff7e94a2 (diff)
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 <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6767 Reviewed-by: Prashanth Pai <ppai@redhat.com> Tested-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: pushpesh sharma <psharma@redhat.com> Tested-by: pushpesh sharma <psharma@redhat.com> Reviewed-by: Chetan Risbud <crisbud@redhat.com>
Diffstat (limited to 'test/functional_auth/gswauth')
-rw-r--r--test/functional_auth/gswauth/test_gswauth_cli.py8
1 files changed, 2 insertions, 6 deletions
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()