def setUp(self): super(TestRdirServer, self).setUp() self.db_path = tempfile.mkdtemp() self.conf = {'db_path': self.db_path, 'namespace': 'NS'} self.app = create_app(self.conf).test_client()
def setUp(self): super(TestRdirServer, self).setUp() self.db_path = tempfile.mkdtemp() self.conf = {'db_path': self.db_path, 'namespace': 'NS'} self.app = create_app(self.conf).test_client() self.app.get("/v1/NS/rdir/create", query_string={'vol': "xxx"})
def setUp(self): super(TestRdirServer, self).setUp() self.db_path = tempfile.mkdtemp() self.conf = {'db_path': self.db_path, 'namespace': 'OPENIO'} self.app = Client(create_app(self.conf), BaseResponse) self.volume = 'testvolume' self.app.get("/v1/rdir/create", query_string={'vol': self.volume}) self.container_id = random_id(64) self.content_id = random_id(32) self.chunk_id = random_id(64) self.mtime = int(time.time()) self.rtime = 0 self.meta = { 'container_id': self.container_id, 'content_id': self.content_id, 'chunk_id': self.chunk_id, 'mtime': self.mtime, 'rtime': self.rtime }
def setUp(self): super(TestRdirServer, self).setUp() self.db_path = tempfile.mkdtemp() self.conf = {'db_path': self.db_path, 'namespace': 'OPENIO'} self.app = Client(create_app(self.conf), BaseResponse) self.volume = 'testvolume' self.app.get("/v1/rdir/create", query_string={'vol': self.volume}) self.container_id = random_id(64) self.content_id = random_id(32) self.chunk_id = random_id(64) self.mtime = int(time.time()) self.rtime = 0 self.meta = { 'container_id': self.container_id, 'content_id': self.content_id, 'chunk_id': self.chunk_id, 'mtime': self.mtime, 'rtime': self.rtime}