def test_dir_option_manager(): conf_dir = mkdtemp() app = TestApp(ud={"galaxy_conf_dir": conf_dir}) option_manager = galaxy_option_manager(app) option_manager.setup() _set_test_property(option_manager) option_file_path = join(conf_dir, '400_cloudman_override_admin_users.ini') content = open(option_file_path, 'r').read() assert content == "[app:main]\[email protected]"
def test_file_option_manager(): app = TestApp() option_manager = galaxy_option_manager(app) option_manager.setup() _set_test_property(option_manager) test_galaxy_home = app.path_resolver.galaxy_home universe_path = join(test_galaxy_home, 'universe_wsgi.ini') with open(universe_path, 'rt') as f: parser = SafeConfigParser() parser.readfp(f) assert parser.get('app:main', "admin_users") == "*****@*****.**"
def test_on_universe_missing_uses_sample(): app = TestApp() option_manager = galaxy_option_manager(app) option_manager.setup() # Rename universe_wsgi.ini to universe_wsgi.ini.sample so it is missing. test_galaxy_home = app.path_resolver.galaxy_home universe_path = join(test_galaxy_home, 'universe_wsgi.ini') sample_path = join(test_galaxy_home, 'universe_wsgi.ini.sample') rename(universe_path, sample_path) _set_test_property(option_manager) with open(universe_path, 'rt') as f: parser = SafeConfigParser() parser.readfp(f) assert parser.get('app:main', "admin_users") == "*****@*****.**"
def __init__(self, app): super(GalaxyService, self).__init__(app) self.name = ServiceRole.to_string(ServiceRole.GALAXY) self.svc_roles = [ServiceRole.GALAXY] self.remaining_start_attempts = NUM_START_ATTEMPTS self.configured = False # Indicates if the environment for running Galaxy has been configured self.ssl_is_on = False # Environment variables to set before executing galaxy's run.sh self.env_vars = {} self.dependencies = [ ServiceDependency(self, ServiceRole.JOB_MANAGER), ServiceDependency(self, ServiceRole.GALAXY_POSTGRES), ServiceDependency(self, ServiceRole.GALAXY_DATA), ServiceDependency(self, ServiceRole.GALAXY_INDICES), ServiceDependency(self, ServiceRole.GALAXY_TOOLS), ServiceDependency(self, ServiceRole.PROFTPD) ] self.option_manager = galaxy_option_manager(app)
def __init__(self, app): super(GalaxyService, self).__init__(app) self.name = ServiceRole.to_string(ServiceRole.GALAXY) self.svc_roles = [ServiceRole.GALAXY] self.remaining_start_attempts = NUM_START_ATTEMPTS # Indicates if the environment for running Galaxy has been configured self.configured = False self.ssl_is_on = False # Environment variables to set before executing galaxy's run.sh self.env_vars = {} self.dependencies = [ ServiceDependency(self, ServiceRole.JOB_MANAGER), ServiceDependency(self, ServiceRole.GALAXY_POSTGRES), ServiceDependency(self, ServiceRole.GALAXY_DATA), ServiceDependency(self, ServiceRole.GALAXY_INDICES), # ServiceDependency(self, ServiceRole.PROFTPD), ServiceDependency(self, ServiceRole.GALAXY_TOOLS) ] self.option_manager = galaxy_option_manager(app)
def __init__(self, app): super(GalaxyService, self).__init__(app) self.name = ServiceRole.to_string(ServiceRole.GALAXY) self.svc_roles = [ServiceRole.GALAXY] self.remaining_start_attempts = NUM_START_ATTEMPTS self.configured = False # Indicates if the environment for running Galaxy has been configured # Environment variables to set before executing galaxy's run.sh self.env_vars = { "SGE_ROOT": self.app.path_resolver.sge_root, "DRMAA_LIBRARY_PATH": self.app.path_resolver.drmaa_library_path } self.dependencies = [ ServiceDependency(self, ServiceRole.SGE), ServiceDependency(self, ServiceRole.GALAXY_POSTGRES), ServiceDependency(self, ServiceRole.GALAXY_DATA), ServiceDependency(self, ServiceRole.GALAXY_INDICES), ServiceDependency(self, ServiceRole.GALAXY_TOOLS), ServiceDependency(self, ServiceRole.PROFTPD) ] self.option_manager = galaxy_option_manager(app)