Ejemplo n.º 1
0
    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()
Ejemplo n.º 2
0
    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()
Ejemplo n.º 3
0
    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"})
Ejemplo n.º 4
0
    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
        }
Ejemplo n.º 5
0
    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}