mirror of
https://github.com/ceph/ceph
synced 2025-02-24 19:47:44 +00:00
Merge pull request #12815 from rjfd/wip-journal-unittest-build-error
tests: fix template specialization of PromoteRequest class Reviewed-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
commit
0dd25f240a
@ -20,6 +20,7 @@
|
||||
#include "librbd/journal/OpenRequest.h"
|
||||
#include "librbd/journal/Types.h"
|
||||
#include "librbd/journal/TypeTraits.h"
|
||||
#include "librbd/journal/PromoteRequest.h"
|
||||
#include "gmock/gmock.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include <functional>
|
||||
@ -182,6 +183,21 @@ public:
|
||||
|
||||
OpenRequest<MockJournalImageCtx> *OpenRequest<MockJournalImageCtx>::s_instance = nullptr;
|
||||
|
||||
|
||||
template <>
|
||||
class PromoteRequest<MockJournalImageCtx> {
|
||||
public:
|
||||
static PromoteRequest s_instance;
|
||||
static PromoteRequest *create(MockJournalImageCtx *image_ctx, bool force,
|
||||
Context *on_finish) {
|
||||
return &s_instance;
|
||||
}
|
||||
|
||||
MOCK_METHOD0(send, void());
|
||||
};
|
||||
|
||||
PromoteRequest<MockJournalImageCtx> PromoteRequest<MockJournalImageCtx>::s_instance;
|
||||
|
||||
} // namespace journal
|
||||
} // namespace librbd
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user