def test_get(self):
     c = SnapshotClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 404]}
     )
     c.get_snapshot('test', 'test', callback=h_cb)
     self.wait()
 def test_get_repository(self):
     c = SnapshotClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 404]}
     )
     c.get_repository(callback=h_cb)
     self.wait()
 def test_status(self):
     c = SnapshotClient()
     h_cb = partial(
         self.handle_cb,
         **{'codes':[400, 404]}
     )
     c.status(callback=h_cb)
     self.wait()
示例#4
0
    def test_create_repository(self):
        c = SnapshotClient()
        body = """
        {
            "type": "fs",
            "settings": {
                "location": "/tmp/test",
            }
        }

        """
        h_cb = partial(self.handle_cb, **{'codes': [400, 404]})
        c.create_repository('test', body, callback=h_cb)
        self.wait()
    def test_restore(self):
        c = SnapshotClient()
        body = """
        '{
           "indices": "index_1,index_2",
           "ignore_unavailable": "true",
           "include_global_state": false,
           "rename_pattern": "index_(.+)",
           "rename_replacement": "restored_index_$1"
        }

        """
        h_cb = partial(self.handle_cb, **{"codes": [400, 404]})
        c.restore("test", "test", body, cb=h_cb)
        self.wait()
    def test_create_repository(self):
        c = SnapshotClient()
        body = """
        {
            "type": "fs",
            "settings": {
                "location": "/tmp/test",
                "compress": true
            }
        }

        """
        h_cb = partial(self.handle_cb, **{"codes": [400, 404]})
        c.create_repository("test", body, cb=h_cb)
        self.wait()
示例#7
0
    def test_restore_snapshot(self):
        c = SnapshotClient()
        body = """
        '{
           "indices": "index_1,index_2",
           "ignore_unavailable": "true",
           "include_global_state": false,
           "rename_pattern": "index_(.+)",
           "rename_replacement": "restored_index_$1"
        }

        """
        h_cb = partial(self.handle_cb, **{'codes': [400, 404]})
        c.restore_snapshot('test', 'test', body, callback=h_cb)
        self.wait()
    def test_create_repository(self):
        c = SnapshotClient()
        body = """
        {
            "type": "fs",
            "settings": {
                "location": "/tmp/test",
            }
        }

        """
        h_cb = partial(
            self.handle_cb,
            **{'codes':[400, 404]}
        )
        c.create_repository('test', body, callback=h_cb)
        self.wait()
 def test_status(self):
     c = SnapshotClient()
     h_cb = partial(self.handle_cb, **{"codes": [400, 404]})
     c.status(cb=h_cb)
     self.wait()
 def test_delete_repository(self):
     c = SnapshotClient()
     h_cb = partial(self.handle_cb, **{"codes": [400, 404]})
     c.delete_repository("test", cb=h_cb)
     self.wait()
 def test_get(self):
     c = SnapshotClient()
     h_cb = partial(self.handle_cb, **{"codes": [400, 404]})
     c.get("test", "test", cb=h_cb)
     self.wait()
示例#12
0
 def test_get_repository(self):
     c = SnapshotClient()
     h_cb = partial(self.handle_cb, **{'codes': [400, 404]})
     c.get_repository(callback=h_cb)
     self.wait()
示例#13
0
 def test_get(self):
     c = SnapshotClient()
     h_cb = partial(self.handle_cb, **{'codes': [400, 404]})
     c.get_snapshot('test', 'test', callback=h_cb)
     self.wait()
示例#14
0
 def test_snapshot_status(self):
     c = SnapshotClient()
     h_cb = partial(self.handle_cb, **{'codes': [400, 404]})
     c.snapshot_status(callback=h_cb)
     self.wait()