]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
unittest: add a unittest for removing non-exist image.
authorDongsheng Yang <dongsheng.yang@easystack.cn>
Mon, 26 Dec 2016 11:18:38 +0000 (06:18 -0500)
committerDongsheng Yang <dongsheng.yang@easystack.cn>
Thu, 23 Feb 2017 03:10:59 +0000 (11:10 +0800)
Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
src/test/librbd/test_librbd.cc

index 320170b3a59cdbd331d6a0a0d899692348aa5314..93d5f5f08a365eca402e3e92d11fcb273ad852ba 100644 (file)
@@ -783,6 +783,8 @@ TEST_F(TestLibRBD, TestCreateLsDelete)
   ASSERT_EQ(0, rbd_remove(ioctx, name.c_str()));
   ASSERT_EQ(1, test_ls(ioctx, 1, name2.c_str()));
 
+  ASSERT_EQ(-ENOENT, rbd_remove(ioctx, name.c_str()));
+
   rados_ioctx_destroy(ioctx);
 }