You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by vi...@apache.org on 2012/07/17 18:18:29 UTC

svn commit: r1362558 - /accumulo/trunk/test/system/auto/simple/shell.py

Author: vines
Date: Tue Jul 17 16:18:29 2012
New Revision: 1362558

URL: http://svn.apache.org/viewvc?rev=1362558&view=rev
Log:
ACCUMULO-691 - now with testing goodness


Modified:
    accumulo/trunk/test/system/auto/simple/shell.py

Modified: accumulo/trunk/test/system/auto/simple/shell.py
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/system/auto/simple/shell.py?rev=1362558&r1=1362557&r2=1362558&view=diff
==============================================================================
--- accumulo/trunk/test/system/auto/simple/shell.py (original)
+++ accumulo/trunk/test/system/auto/simple/shell.py Tue Jul 17 16:18:29 2012
@@ -19,6 +19,7 @@ import logging
 import unittest
 import time
 from TestUtils import TestUtilsMixin, ROOT, ROOT_PASSWORD, ACCUMULO_HOME
+from subprocess import Popen as BasePopen, PIPE
 
 log = logging.getLogger('test.shell')
       
@@ -36,6 +37,7 @@ class ShellTest(TestUtilsMixin,unittest.
         TestUtilsMixin.setUp(self)
         
     def runTest(self):
+        self.badLoginTest()
         self.setIterTest()
         self.setScanIterTest()
         self.iteratorsTest()
@@ -55,6 +57,12 @@ class ShellTest(TestUtilsMixin,unittest.
         self.getauthsTest()
         
         
+    def badLoginTest(self, **opts):
+      log.debug("Running shell with bad password")
+      handle = self.runOn(self.masterHost(), [self.accumulo_sh(), 'shell', '-u', ROOT, '-p', "ThisWouldBeATerriblePasswordToHave"], stdin=PIPE, **opts)
+      handle.communicate("quit\n")
+      self.failUnless(handle.returncode != 0, "Was able to create a shell with bad credentials")
+
     def setIterTest(self):
         input = 'setiter -t setitertest -n mymax -scan -p 10 -class org.apache.accumulo.core.iterators.user.MaxCombiner\n\ncf\n\nSTRING\n'
         out,err,code = self.rootShell(self.masterHost(),input)