def setUp(self):
     self.testHelp = com.TestHelp("/var/log/hsn2/",
                                  suiteName=self.__class__.__name__,
                                  testName=self._testMethodName,
                                  loglevel=logging.INFO)
     self.addCleanup(self.testHelp.done)
     com.Starter.initStop("rabbitmq-server")
 def setUp(self):
     com.Backup.backupFile("/etc/hsn2/razorback/virustotal.conf")
     self.setApiKey(self.apiKey)
     self.testHelp = com.TestHelp("/var/log/hsn2/",
                                  suiteName=self.__class__.__name__,
                                  testName=self._testMethodName,
                                  loglevel=logging.INFO)
     self.addCleanup(self.testHelp.done)
     com.Starter.initRabbitMQ()
     com.Starter.initCouchDB()
     com.Configuration.setServices(
         ["object-feeder", "rb-virustotal", "reporter"])
     com.Configuration.resetJobCounter()
     com.Starter.initStart("hsn2-framework")
     com.Starter.initStart("hsn2-object-store-mongodb")
     com.Starter.initStart("hsn2-data-store")
     com.Starter.initStart("hsn2-object-feeder")
     com.Starter.initStart("hsn2-rb-virustotal")
     com.Starter.waitCouchDB()
     com.Configuration.deleteCouchDB(database="hsn")
     com.Starter.initStart("hsn2-reporter")
     com.Configuration.setWorkflow(
         "/tmp/tests/workflows/nuggets/rb-virustotal1.hwl")
     com.Configuration.setConsoleConf(host="127.0.0.1",
                                      port=5672,
                                      timeout=4)
Esempio n. 3
0
 def setUp(self):
     self.testHelp = com.TestHelp("/var/log/hsn2/",
                                  suiteName=self.__class__.__name__,
                                  testName=self._testMethodName,
                                  loglevel=logging.INFO)
     self.addCleanup(self.testHelp.done)
     com.Starter.initRabbitMQ()
     com.Configuration.setServices([
         "object-feeder", "feeder-list", "webclient", "js-sta",
         "shell-scdbg", "swf-cve", "reporter"
     ])
     com.Configuration.resetJobCounter()
     com.Starter.initCouchDB()
     # TODO: remove this workaround after com.Starter.initCouchDB(wait=True) is fixed
     import time
     time.sleep(5)
     couchdb.Server().delete('hsn')
     com.Starter.initStart("hsn2-framework")
     com.Starter.initStart("hsn2-object-store-mongodb")
     com.Starter.initStart("hsn2-data-store")
     com.Starter.initStart("hsn2-object-feeder")
     com.Configuration.setConsoleConf(host="127.0.0.1",
                                      port=5672,
                                      timeout=4)
     com.Starter.initStart("hsn2-reporter")
 def setUp(self):
     self.testHelp = com.TestHelp("/var/log/hsn2/",
                                  suiteName=self.__class__.__name__,
                                  testName=self._testMethodName,
                                  loglevel=logging.INFO)
     self.addCleanup(self.testHelp.done)
     com.Starter.initRabbitMQ()
     com.Starter.initCouchDB()
     com.Configuration.setServices(
         ["object-feeder", "rb-clamavnugget", "reporter"])
     com.Configuration.resetJobCounter()
     com.Starter.initStart("hsn2-framework")
     com.Starter.initStart("hsn2-object-store-mongodb")
     com.Starter.initStart("hsn2-data-store")
     com.Starter.initStart("hsn2-object-feeder")
     com.Starter.initStart("clamav-daemon-for-tests", service=False)
     com.Starter.initStart("hsn2-rb-clamavnugget")
     com.Starter.waitCouchDB()
     #		com.Configuration.deleteCouchDB(database = "hsn")
     com.Starter.initStart("hsn2-reporter")
     com.Configuration.setWorkflow(
         "/tmp/tests/workflows/nuggets/rb-clamavnugget1.hwl")
     com.Configuration.setConsoleConf(host="127.0.0.1",
                                      port=5672,
                                      timeout=4)
 def setUp(self):
     self.testHelp = com.TestHelp("/var/log/hsn2/",
                                  suiteName=self.__class__.__name__,
                                  testName=self._testMethodName,
                                  loglevel=logging.INFO)
     self.addCleanup(self.testHelp.done)
     com.Starter.initRabbitMQ()
     com.Configuration.resetJobCounter()
     com.Website("/tmp/tests/workflows/simple", 80)
     com.Starter.initCouchDB(wait=True)
     com.Starter.initStart("hsn2-framework")
     com.Starter.initStart("hsn2-object-store-mongodb")
     com.Starter.initStart("hsn2-data-store")
     com.Starter.initStart("hsn2-file-feeder")
     com.Starter.initStart("hsn2-webclient")
     com.Starter.initStart("hsn2-js-sta")
     cdb = couchdb.Server()
     if 'hsn' in cdb:
         cdb.delete('hsn')
     com.Starter.initStart("hsn2-reporter")
     com.Configuration.setConsoleConf(host="127.0.0.1",
                                      port=5672,
                                      timeout=4)
     com.Configuration.setWorkflow("/tmp/tests/workflows/simple/simple.hwl")
     com.Configuration.setConf("/tmp/tests/file.txt", "http://localhost/")
Esempio n. 6
0
 def setUp(self):
     self.testHelp = com.TestHelp("/var/log/hsn2/",
                                  suiteName=self.__class__.__name__,
                                  testName=self._testMethodName,
                                  loglevel=logging.INFO)
     self.addCleanup(self.testHelp.done)
     com.Starter.initRabbitMQ()
     com.Starter.initStart("hsn2-framework")
 def setUp(self):
     self.testHelp = com.TestHelp("/var/log/hsn2/",
                                  suiteName=self.__class__.__name__,
                                  testName=self._testMethodName,
                                  loglevel=logging.INFO)
     self.addCleanup(self.testHelp.done)
     com.Starter.initRabbitMQ()
     com.Starter.initStart("hsn2-framework")
     time.sleep(3)
     com.Configuration.setWorkflow("/tmp/tests/workflows/simple/simple.hwl")
 def setUp(self):
     self.testHelp = com.TestHelp("/var/log/hsn2/",
                                  suiteName=self.__class__.__name__,
                                  testName=self._testMethodName,
                                  loglevel=logging.INFO)
     self.addCleanup(self.testHelp.done)
     com.Starter.initRabbitMQ()
     com.Configuration.resetJobCounter()
     com.Configuration.setServices(
         ["object-feeder", "webclient", "reporter"])
     com.Starter.initStart("hsn2-framework")
     com.Starter.initStart("hsn2-object-store-mongodb")
     com.Configuration.setWorkflow("/tmp/tests/workflows/minimal/stub.hwl")
     com.Configuration.setConsoleConf(host="127.0.0.1",
                                      port=5672,
                                      timeout=4)
 def setUp(self):
     self.testHelp = com.TestHelp("/var/log/hsn2/",
                                  suiteName=self.__class__.__name__,
                                  testName=self._testMethodName,
                                  loglevel=logging.INFO)
     self.addCleanup(self.testHelp.done)
     com.Configuration.resetJobCounter()
     com.Starter.initRabbitMQ()
     com.Starter.initStart("hsn2-framework")
     com.Starter.initStart("hsn2-object-store-mongodb")
     com.Starter.initStart("hsn2-data-store")
     com.Starter.initStart("hsn2-file-feeder")
     com.Starter.initStart("hsn2-webclient")
     com.Starter.initStart("hsn2-js-sta")
     com.Starter.initStart("hsn2-swf-cve")
     com.Configuration.setWorkflowsFolder("/tmp/tests/workflows/correct")
     com.Configuration.setConf("/file.txt", "http://www.nask.pl/")
     com.Configuration.setConf("/tmp/tests/file.txt", "http://www.nask.pl/")
 def setUp(self):
     self.testHelp = com.TestHelp("/var/log/hsn2/",
                                  suiteName=self.__class__.__name__,
                                  testName=self._testMethodName,
                                  loglevel=logging.INFO)
     self.addCleanup(self.testHelp.done)
     #com.Starter.initRabbitMQ()
     #com.Configuration.setServices(["object-feeder","feeder-list", "webclient", "js-sta", "shell-scdbg", "swf-cve", "reporter"])
     #com.Configuration.resetJobCounter()
     #com.Starter.initStart("hsn2-framework")
     #com.Starter.initStart("hsn2-object-store-mongodb")
     #com.Starter.initStart("hsn2-data-store")
     #com.Starter.initStart("hsn2-object-feeder")
     #com.Starter.initStart("hsn2-capture-hpc")
     if not os.path.exists("/etc/init.d/hsn2-capture-hpc-mock"):
         shutil.copyfile('/tmp/tests/lib/hsn2-capture-hpc-mock.initd',
                         "/etc/init.d/hsn2-capture-hpc-mock")
         shutil.copymode('/tmp/tests/lib/hsn2-capture-hpc-mock.initd',
                         "/etc/init.d/hsn2-capture-hpc-mock")
     com.CaptureHPC.clearLogs()
     com.Starter.initStart("hsn2-capture-hpc-mock")
 def setUp(self):
     self.testHelp = com.TestHelp("/var/log/hsn2/",
                                  suiteName=self.__class__.__name__,
                                  testName=self._testMethodName,
                                  loglevel=logging.INFO)
     self.addCleanup(self.testHelp.done)
     com.Starter.initRabbitMQ()
     com.Starter.initCouchDB()
     com.Configuration.setServices(["cuckoo", "reporter", "feeder-list"])
     com.Configuration.resetJobCounter()
     com.Starter.initStart("hsn2-framework")
     com.Starter.initStart("hsn2-object-store-mongodb")
     com.Starter.initStart("hsn2-data-store")
     com.Starter.initStart("hsn2-file-feeder")
     com.Starter.initStart("hsn2-cuckoo")
     com.Starter.initStart("cuckoo-mock")
     com.Starter.waitCouchDB()
     com.Configuration.deleteCouchDB(database="hsn")
     com.Starter.initStart("hsn2-reporter")
     com.Configuration.setWorkflow(
         "/tmp/tests/workflows/integration/cuckoo.hwl")
     com.Configuration.setConsoleConf(host="127.0.0.1",
                                      port=5672,
                                      timeout=4)