def setUp(self): self.keeptmp = tempfile.mkdtemp() os.environ['KEEP_LOCAL_STORE'] = self.keeptmp self.mounttmp = tempfile.mkdtemp() run_test_server.run() run_test_server.authorize_with("admin") self.api = arvados.safeapi.ThreadSafeApiCache(arvados.config.settings())
def setUp(self): self.keeptmp = tempfile.mkdtemp() os.environ['KEEP_LOCAL_STORE'] = self.keeptmp self.mounttmp = tempfile.mkdtemp() run_test_server.run(False) run_test_server.authorize_with("admin") self.api = api = fuse.SafeApi(arvados.config)
def setUpClass(cls): # The apiclient library has support for mocking requests for # testing, but it doesn't extend to the discovery document # itself. For now, bring up an API server that will serve # a discovery document. # FIXME: Figure out a better way to stub this out. run_test_server.run() mock_responses = { 'arvados.humans.delete': (fake_httplib2_response(500, **cls.ERROR_HEADERS), ""), 'arvados.humans.get': cls.api_error_response(422, "Bad UUID format", "Bad output format"), 'arvados.humans.list': (None, json.dumps({ 'items_available': 0, 'items': [] })), } req_builder = apiclient_http.RequestMockBuilder(mock_responses) cls.api = arvados.api('v1', host=os.environ['ARVADOS_API_HOST'], token='discovery-doc-only-no-token-needed', insecure=True, requestBuilder=req_builder)
def setUpClass(cls): try: del os.environ['KEEP_LOCAL_STORE'] except KeyError: pass run_test_server.run() run_test_server.run_keep(blob_signing_key='abcdefghijk0123456789', enforce_permissions=False)
def setUp(self): super(FuseTagsTest, self).setUp() cw = arvados.CollectionWriter() cw.start_new_file('foo') cw.write("foo") self.testcollection = cw.finish() run_test_server.run()
def setUp(self): # The underlying C implementation of open() makes a fstat() syscall # with the GIL still held. When the GETATTR message comes back to # llfuse (which in these tests is in the same interpreter process) it # can't acquire the GIL, so it can't service the fstat() call, so it # deadlocks. The workaround is to run some of our test code in a # separate process. Forturnately the multiprocessing module makes this # relatively easy. self.pool = multiprocessing.Pool(1) self.keeptmp = tempfile.mkdtemp() os.environ['KEEP_LOCAL_STORE'] = self.keeptmp self.mounttmp = tempfile.mkdtemp() run_test_server.run() run_test_server.authorize_with("admin") self.api = arvados.safeapi.ThreadSafeApiCache(arvados.config.settings())
def setUpClass(cls): super(KeepProxyTestCase, cls).setUpClass() try: del os.environ['KEEP_LOCAL_STORE'] except KeyError: pass os.environ["ARVADOS_KEEP_PROXY"] = "" os.environ["ARVADOS_EXTERNAL_CLIENT"] = "" run_test_server.run() run_test_server.run_keep() arvados.keep.global_client_object = None arvados.config._settings = None run_test_server.run_keep_proxy("admin") KeepProxyTestCase.arvados_keep_proxy = arvados.config.get("ARVADOS_KEEP_PROXY")
def setUpClass(cls): super(KeepTestCase, cls).setUpClass() try: del os.environ['KEEP_LOCAL_STORE'] except KeyError: pass # Make sure these are clear, we want to talk to the Keep servers # directly. os.environ["ARVADOS_KEEP_PROXY"] = "" os.environ["ARVADOS_EXTERNAL_CLIENT"] = "" run_test_server.run() run_test_server.run_keep() arvados.keep.global_client_object = None arvados.config._settings = None run_test_server.authorize_with("admin")
def setUp(self, api=None): # The underlying C implementation of open() makes a fstat() syscall # with the GIL still held. When the GETATTR message comes back to # llfuse (which in these tests is in the same interpreter process) it # can't acquire the GIL, so it can't service the fstat() call, so it # deadlocks. The workaround is to run some of our test code in a # separate process. Forturnately the multiprocessing module makes this # relatively easy. self.pool = multiprocessing.Pool(1) self.keeptmp = tempfile.mkdtemp() os.environ['KEEP_LOCAL_STORE'] = self.keeptmp self.mounttmp = tempfile.mkdtemp() run_test_server.run() run_test_server.authorize_with("admin") self.api = api if api else arvados.safeapi.ThreadSafeApiCache( arvados.config.settings())
def setUpClass(cls): try: del os.environ['KEEP_LOCAL_STORE'] except KeyError: pass # Use the blob_signing_key from the Rails "test" configuration # to provision the Keep server. with open(os.path.join(os.path.dirname(__file__), run_test_server.ARV_API_SERVER_DIR, "config", "application.yml")) as f: rails_config = yaml.load(f.read()) try: config_blob_signing_key = rails_config["test"]["blob_signing_key"] except KeyError: config_blob_signing_key = rails_config["common"]["blob_signing_key"] run_test_server.run() run_test_server.run_keep(blob_signing_key=config_blob_signing_key, enforce_permissions=True)
def setUpClass(cls): # The apiclient library has support for mocking requests for # testing, but it doesn't extend to the discovery document # itself. For now, bring up an API server that will serve # a discovery document. # FIXME: Figure out a better way to stub this out. run_test_server.run() mock_responses = { 'arvados.humans.delete': ( fake_httplib2_response(500, **cls.ERROR_HEADERS), ""), 'arvados.humans.get': cls.api_error_response( 422, "Bad UUID format", "Bad output format"), 'arvados.humans.list': (None, json.dumps( {'items_available': 0, 'items': []})), } req_builder = RequestMockBuilder(mock_responses) cls.api = arvados.api('v1', cache=False, host=os.environ['ARVADOS_API_HOST'], token='discovery-doc-only-no-token-needed', insecure=True, requestBuilder=req_builder)
def start(): run_test_server.run() run_test_server.run_keep()
def setUp(self): super(FuseTagsUpdateTestPoll, self).setUp() run_test_server.run(False)
def setUp(self): super(FuseGroupsTest, self).setUp() run_test_server.run()
def setUp(self): super(FuseTagsUpdateTestWebsockets, self).setUp() run_test_server.run(True)
def setUp(self): run_test_server.run(websockets=True)
def setUp(self): run_test_server.run()
def setUpClass(cls): run_test_server.run() run_test_server.run_keep(enforce_permissions=True, num_servers=2) run_test_server.authorize_with('active')
def setUp(self): self.mntdir = tempfile.mkdtemp() run_test_server.run() run_test_server.authorize_with("active") self.logger = logging.getLogger("null") self.logger.setLevel(logging.CRITICAL+1)
def setUpClass(cls): run_test_server.run()
def setUpClass(cls): run_test_server.run() run_test_server.run_keep(enforce_permissions=True, num_servers=2)