]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librbd: TestMockImageRemoveRequest gmock warnings
authorMykola Golub <mgolub@mirantis.com>
Tue, 16 May 2017 12:34:22 +0000 (14:34 +0200)
committerMykola Golub <mgolub@mirantis.com>
Tue, 16 May 2017 12:39:37 +0000 (14:39 +0200)
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
src/test/librbd/image/test_mock_RemoveRequest.cc

index 4b271a454c95e4338883f18cf43552e381e6349f..77c536d03a8712e46cc04c6797f9ad8a08f20042 100644 (file)
@@ -154,6 +154,9 @@ public:
       .WillOnce(Invoke([r](bool open_parent, Context *on_ready) {
                  on_ready->complete(r);
                 }));
+    if (r < 0) {
+      EXPECT_CALL(mock_image_ctx, destroy());
+    }
   }
 
   void expect_state_close(MockImageCtx &mock_image_ctx) {
@@ -161,6 +164,7 @@ public:
       .WillOnce(Invoke([](Context *on_ready) {
                   on_ready->complete(0);
                 }));
+    EXPECT_CALL(mock_image_ctx, destroy());
   }
 
   void expect_wq_queue(ContextWQ &wq, int r) {