Esempio n. 1
0
 def test_basic001(self):
     # reset list of syscalls
     #print '++++++++++ DEBUG: starting test_basic001'
     global mycmds
     mycmds = []
     
     mgr = ClusterMgr()
     c1 = mgr.alloc_new('testsub1',self._defcfg,'vagrant')
     
     utils.syscall_cb = mysyscb
     
     c1.start()
     tr = TestRunner()
     testsuite = tests.call_by_name('basic001')
     result = tr.run(c1, testsuite)
     print 'Status:', 'Pass' if result.passfail() else 'Fail'
     
     # now check that the right system calls were executed
     callpats = [
         'vagrant.*up',
         'ssh.*echo',
         'ssh.*dbFunctional.sh'
         ]
     self.check_syscalls(callpats)
     utils.syscall_cb = None
             
     mgr.destroy(c1)
Esempio n. 2
0
    def run(self, args):
        if not len(args) == 2:
            self.usage()

        cluster = self._attach_by_name(args[0])
        tr = TestRunner()
        testsuite = tests.call_by_name(args[1])
        result = tr.run(cluster, testsuite)
        print "Status:", "Pass" if result.passfail() else "Fail"
Esempio n. 3
0
 def test_basic002(self):
     # reset list of syscalls
     #print '++++++++++ DEBUG: starting test_basic002'
     global mycmds
     mycmds = []
     
     mgr = ClusterMgr()
     c1 = mgr.alloc_new('testbasic002',self._defcfg,'vagrant')
     
     utils.syscall_cb = mysyscb
     
     c1.start()
     tr = TestRunner()
     testsuite = tests.call_by_name('basic002')
     result = tr.run(c1, testsuite)
     print 'Status:', 'Pass' if result.passfail() else 'Fail'
     
     # now check that the right system calls were executed
     callpats = [
         'vagrant.*up',
         'ssh.*echo',
         'ssh.*upgradeTest2.sh',
         'ssh.*calpontConsole shutdown y',
         'ssh.*sleep 5',
         'ssh.*infinidb_not_running.sh',
         'ssh.*calpontConsole startsystem',
         'ssh.*sleep 5',
         'ssh.*upgradeTest2.sh',
         'ssh.*calpontConsole restartsystem y',
         'ssh.*sleep 5',
         'ssh.*upgradeTest2.sh',
         'ssh.*calpontConsole stopsystem y',
         'ssh.*sleep 5',
         'ssh.*calpontConsole startsystem',
         'ssh.*sleep 5',
         'ssh.*upgradeTest2.sh',
         'ssh.*calpontConsole shutdown y',
         'ssh.*sleep 5',
         'ssh.*infinidb_not_running.sh',
         'vagrant halt',
         'vboxmanage startvm.*headless',
         'vboxmanage startvm.*headless',
         'ssh.*healthcheck',
         'ssh.*upgradeTest2.sh',
         ]
     self.check_syscalls(callpats)
     utils.syscall_cb = None
             
     mgr.destroy(c1)