Improved flush test cases
This commit is contained in:
parent
748f38c991
commit
6f5c1c17e9
@ -22,8 +22,6 @@ TEST_P(FuseFlushErrorTest, ReturnErrorFromFlush) {
|
|||||||
|
|
||||||
EXPECT_CALL(fsimpl, openFile(StrEq(FILENAME), _)).WillOnce(Return(GetParam()));
|
EXPECT_CALL(fsimpl, openFile(StrEq(FILENAME), _)).WillOnce(Return(GetParam()));
|
||||||
EXPECT_CALL(fsimpl, flush(Eq(GetParam()))).Times(1).WillOnce(Throw(FuseErrnoException(GetParam())));
|
EXPECT_CALL(fsimpl, flush(Eq(GetParam()))).Times(1).WillOnce(Throw(FuseErrnoException(GetParam())));
|
||||||
// Allow calls to closeFile(), but don't enforce them
|
|
||||||
EXPECT_CALL(fsimpl, closeFile(Eq(GetParam()))).Times(AtLeast(0));
|
|
||||||
|
|
||||||
auto fs = TestFS();
|
auto fs = TestFS();
|
||||||
int fd = OpenFile(fs.get(), FILENAME);
|
int fd = OpenFile(fs.get(), FILENAME);
|
||||||
|
@ -30,8 +30,6 @@ TEST_P(FuseFlushFileDescriptorTest, FlushOnCloseFile) {
|
|||||||
|
|
||||||
EXPECT_CALL(fsimpl, openFile(StrEq(FILENAME), _)).WillOnce(Return(GetParam()));
|
EXPECT_CALL(fsimpl, openFile(StrEq(FILENAME), _)).WillOnce(Return(GetParam()));
|
||||||
EXPECT_CALL(fsimpl, flush(Eq(GetParam()))).Times(1);
|
EXPECT_CALL(fsimpl, flush(Eq(GetParam()))).Times(1);
|
||||||
// Allow calls to closeFile(), but don't enforce them
|
|
||||||
EXPECT_CALL(fsimpl, closeFile(Eq(GetParam()))).Times(AtLeast(0));
|
|
||||||
|
|
||||||
OpenAndCloseFile(FILENAME);
|
OpenAndCloseFile(FILENAME);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user