unit test fixes
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
This commit is contained in:
parent
8e4a8f0f4b
commit
bb4e3c26f4
@ -1567,8 +1567,8 @@ TEST_F(file_manager_test,
|
||||
EXPECT_CALL(mp, create_file("/test_create.txt", meta))
|
||||
.WillOnce(Return(api_error::success));
|
||||
EXPECT_CALL(mp, get_filesystem_item)
|
||||
.WillOnce([&meta](const std::string &api_path, bool directory,
|
||||
filesystem_item &fsi) -> api_error {
|
||||
.WillRepeatedly([&meta](const std::string &api_path, bool directory,
|
||||
filesystem_item &fsi) -> api_error {
|
||||
EXPECT_STREQ("/test_create.txt", api_path.c_str());
|
||||
EXPECT_FALSE(directory);
|
||||
fsi.api_path = api_path;
|
||||
@ -1582,11 +1582,20 @@ TEST_F(file_manager_test,
|
||||
#if defined(_WIN32)
|
||||
EXPECT_EQ(api_error::success,
|
||||
fm.create("/test_create.txt", meta, {}, handle, f));
|
||||
#else
|
||||
#else // !defined(_WIN32)
|
||||
EXPECT_EQ(api_error::success,
|
||||
fm.create("/test_create.txt", meta, O_RDWR, handle, f));
|
||||
#endif
|
||||
#endif // defined(_WIN32)
|
||||
|
||||
EXPECT_CALL(mp, set_item_meta("/test_create.txt", _))
|
||||
.WillOnce([](const std::string &,
|
||||
const api_meta_map &new_meta) -> api_error {
|
||||
EXPECT_EQ(
|
||||
utils::encryption::encrypting_reader::get_data_chunk_size() * 4UL,
|
||||
utils::string::to_uint64(new_meta.at(META_SIZE)));
|
||||
return api_error::success;
|
||||
});
|
||||
EXPECT_CALL(mp, upload_file).Times(1U);
|
||||
f->resize(utils::encryption::encrypting_reader::get_data_chunk_size() *
|
||||
4UL);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user