예제 #1
0
 def isRunning(self, port):
     for i in range(3):
         try:
             rsp = montysolrupdate.req("http://localhost:%s/solr/admin/cores" % port)
             self.assertIn('status', rsp, "The instance was not started properly")
             return True
         except IOError, e:
             time.sleep(0.5)
예제 #2
0
 def test_01_fresh_installation(self):
     
     self.registerTestInstance("test-7000")
     
     try:
         montysolrupdate.req("http://localhost:7000/solr/admin/cores")
     except:
         pass
     else:
         self.fail("There is something running on port 7000")
         
     try:
         paths_exist(['test-7000',])
     except:
         pass
     else:
         self.fail("There is something at test-7000")
     
     try:
         paths_exist(['montysolr', 'montysolr/build/contrib/examples/adsabs'])
     except:
         pass
     else:
         self.fail("There is already 'adsabs' deploy target")
         
     montysolrupdate.main(['foo', '-a', '-c', '-u', 'test-7000'])
     paths_exist(['python', 
                  'python/lib/python*/site-packages/invenio',
                  'python/lib/python*/site-packages/JCC*',
                  'python/lib/python*/site-packages/MySQLdb',
                  'python/lib/python*/site-packages/numpy',
                  'python/lib/python*/site-packages/lucene*',
                  'python/lib/python*/site-packages/simplejson',
                  'python/lib/python*/site-packages/sqlalchemy',
                  'python/lib/python*/site-packages/lxml',
                  ])
     
     paths_exist(['test-7000',])
     self.isRunning("7000")
예제 #3
0
 def isNotRunning(self, port):
     try:
         rsp = montysolrupdate.req("http://localhost:%s/solr/admin/cores" % port)
     except:
         return True
     self.fail("The instance %s is runnning and should be dead!" % port)