Example #1
0
def infraup(request):

    from distark.majordaemon.infralauncher import InfraLauncher

    def run_only_at_session_end():
        print "\nfinalizing session"
        InfraLauncher.stop()

    if pytest.config.getoption('confpath') is not None:
        if len(pytest.config.getoption('confpath')) > 0:
            confpath = pytest.config.getoption('confpath')[0]
    print "Launch Infra with conf:", confpath

    InfraLauncher.launch(confpath, 2)
    request.addfinalizer(run_only_at_session_end)
Example #2
0
 def tearDownBench(self):
     InfraLauncher.stop()
     self.logd("teardown\n")
Example #3
0
 def setUpBench(self):
     """Setting up test."""
     self.label="testing different services" + "\n"
     self.mode='bench'
     # self.server_url = self.conf_get('main', 'url')
     InfraLauncher.launch(2)
Example #4
0
 def tearDown(self):
     if not(self.in_bench_mode):
         InfraLauncher.stop()
Example #5
0
 def setUp(self):
     if not(self.in_bench_mode):
         InfraLauncher.launch(2)
Example #6
0
 def run_only_at_session_end():
     print "\nfinalizing session"
     InfraLauncher.stop()