From: Josh Durgin Date: Mon, 26 Sep 2011 17:35:37 +0000 (-0700) Subject: test_rbd.py: Add large read and write tests X-Git-Tag: v0.37~137 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d71bf04f3fc498a270b90ece409d7c238a8eaaa4;p=ceph.git test_rbd.py: Add large read and write tests Signed-off-by: Josh Durgin --- diff --git a/src/test/pybind/test_rbd.py b/src/test/pybind/test_rbd.py index 6d30c4d4db1a..3a755b0cb65e 100644 --- a/src/test/pybind/test_rbd.py +++ b/src/test/pybind/test_rbd.py @@ -15,8 +15,7 @@ IMG_ORDER = 22 # 4 MiB objects def setUp(): global rados - rados = Rados() - rados.conf_read_file() + rados = Rados(conffile='') rados.connect() assert rados.pool_exists('rbd') global ioctx @@ -103,6 +102,14 @@ class TestImage(object): data = self.image.read(0, 20) eq(data, '\0' * 20) + def test_large_write(self): + data = rand_data(IMG_SIZE) + self.image.write(data, 0) + + def test_large_read(self): + data = self.image.read(0, IMG_SIZE) + eq(data, '\0' * IMG_SIZE) + def test_write_read(self): data = rand_data(256) offset = 50