Commit f14752c8 authored by Eric Cano's avatar Eric Cano
Browse files

Removed GMock calls counting in MountSesssionGoodday test.

parent 30156279
......@@ -78,6 +78,8 @@ TEST(tapeServer, MountSessionGoodday) {
// construct and run the session.
castor::log::StringLogger logger("tapeServerUnitTest");
castor::tape::System::mockWrapper mockSys;
mockSys.delegateToFake();
mockSys.disableGMockCallsCounting();
mockSys.fake.setupForVirtualDriveSLC6();
utils::TpconfigLines tpConfig;
// Actual TPCONFIG lifted from prod
......
......@@ -231,6 +231,23 @@ void System::mockWrapper::delegateToFake() {
ON_CALL(*this, stat(_, _)).WillByDefault(Invoke(&fake, &fakeWrapper::stat));
}
void System::mockWrapper::disableGMockCallsCounting() {
using testing::AnyNumber;
EXPECT_CALL(*this, opendir(_)).Times(AnyNumber());
EXPECT_CALL(*this, readdir(_)).Times(AnyNumber());
EXPECT_CALL(*this, closedir(_)).Times(AnyNumber());
EXPECT_CALL(*this, realpath(_, _)).Times(AnyNumber());
EXPECT_CALL(*this, open(_, _)).Times(AnyNumber());
EXPECT_CALL(*this, read(_, _, _)).Times(AnyNumber());
EXPECT_CALL(*this, write(_, _, _)).Times(AnyNumber());
EXPECT_CALL(*this, close(_)).Times(AnyNumber());
EXPECT_CALL(*this, readlink(_, _, _)).Times(AnyNumber());
EXPECT_CALL(*this, stat(_,_)).Times(AnyNumber());
EXPECT_CALL(*this, ioctl(_, _, A<struct mtop *>())).Times(AnyNumber());
EXPECT_CALL(*this, ioctl(_, _, A<struct mtget *>())).Times(AnyNumber());
EXPECT_CALL(*this, ioctl(_, _, A<struct sg_io_hdr *>())).Times(AnyNumber());
}
void System::fakeWrapper::setupSLC5() {
/*
* Setup an tree similar to what we'll find in
......
......@@ -166,6 +166,7 @@ namespace System {
DIR* m_DIR;
int m_DIRfake;
void delegateToFake();
void disableGMockCallsCounting();
fakeWrapper fake;
};
} // namespace System
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment