mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
zfsd: fix unit tests after 89f4f91dbf
Reported by: markj
MFC after: 1 week
MFC with: 89f4f91dbf
Sponsored by: Axcient
Reviewed by: Alek Pinchuk <[email protected]>
Differential Revision: https://reviews.freebsd.org/D44744
This commit is contained in:
1 parent
738c02ba24
commit
25038e8de6
2 files changed
+4
-1
No files matched your search
@@ -134,6 +134,7 @@ public:
|
||||
MOCK_CONST_METHOD0(PoolGUID, Guid());
|
||||
MOCK_CONST_METHOD0(State, vdev_state());
|
||||
MOCK_CONST_METHOD0(PhysicalPath, string());
|
||||
MOCK_CONST_METHOD2(Name, string(zpool_handle_t * zhp, bool verbose));
|
||||
};
|
||||
|
||||
MockVdev::MockVdev(nvlist_t *vdevConfig)
|
||||
@@ -431,6 +432,8 @@ protected:
|
||||
m_vdev = new MockVdev(m_vdevConfig);
|
||||
ON_CALL(*m_vdev, GUID())
|
||||
.WillByDefault(::testing::Return(Guid(123)));
|
||||
ON_CALL(*m_vdev, Name(::testing::_, ::testing::_))
|
||||
.WillByDefault(::testing::Return(string("/dev/da999")));
|
||||
ON_CALL(*m_vdev, PoolGUID())
|
||||
.WillByDefault(::testing::Return(Guid(456)));
|
||||
ON_CALL(*m_vdev, State())
|
||||
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
nvlist_t *Config() const;
|
||||
Vdev Parent();
|
||||
Vdev RootVdev();
|
||||
std::string Name(zpool_handle_t *, bool verbose) const;
|
||||
virtual std::string Name(zpool_handle_t *, bool verbose) const;
|
||||
bool IsSpare();
|
||||
bool IsAvailableSpare() const;
|
||||
bool IsActiveSpare() const;
|
||||
|
||||
Reference in new issue
Block a user