]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test_rbd.py: Add large read and write tests
authorJosh Durgin <josh.durgin@dreamhost.com>
Mon, 26 Sep 2011 17:35:37 +0000 (10:35 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Tue, 27 Sep 2011 01:10:40 +0000 (18:10 -0700)
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
src/test/pybind/test_rbd.py

index 6d30c4d4db1a68d90a08d5fbf6e87d2bfbc7973b..3a755b0cb65e8ce4e4b640300441ac171196bfb7 100644 (file)
@@ -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