Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
f14752c8
Commit
f14752c8
authored
Mar 19, 2014
by
Eric Cano
Browse files
Removed GMock calls counting in MountSesssionGoodday test.
parent
30156279
Changes
3
Hide whitespace changes
Inline
Side-by-side
castor/tape/tapeserver/daemon/tapeserverdTest.cpp
View file @
f14752c8
...
...
@@ -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
...
...
castor/tape/tapeserver/system/Wrapper.cpp
View file @
f14752c8
...
...
@@ -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
...
...
castor/tape/tapeserver/system/Wrapper.hpp
View file @
f14752c8
...
...
@@ -166,6 +166,7 @@ namespace System {
DIR
*
m_DIR
;
int
m_DIRfake
;
void
delegateToFake
();
void
disableGMockCallsCounting
();
fakeWrapper
fake
;
};
}
// namespace System
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment