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:
@ -114,7 +114,8 @@ auto encrypt_provider::create_api_file(
|
||||
file.creation_date =
|
||||
(static_cast<std::uint64_t>(ft.dwHighDateTime) << 32U) | ft.dwLowDateTime;
|
||||
|
||||
ft = utils::time::unix_time_to_filetime(utils::time::time64_to_unix_time(buf.st_mtime));
|
||||
ft = utils::time::unix_time_to_filetime(
|
||||
utils::time::time64_to_unix_time(buf.st_mtime));
|
||||
file.modified_date =
|
||||
(static_cast<std::uint64_t>(ft.dwHighDateTime) << 32U) | ft.dwLowDateTime;
|
||||
#else
|
||||
|
@ -196,8 +196,8 @@ TEST(open_file,
|
||||
}
|
||||
|
||||
TEST(open_file, write_with_incomplete_download) {
|
||||
const auto source_path = test::generate_test_file_name("test");
|
||||
auto nf = test::create_random_file(test_chunk_size * 2u);
|
||||
const auto source_path = nf.get_path().string();
|
||||
|
||||
mock_provider mp;
|
||||
mock_upload_manager um;
|
||||
|
@ -437,10 +437,9 @@ TEST(ring_buffer_open_file, read_full_file_in_reverse) {
|
||||
|
||||
TEST(ring_buffer_open_file, read_full_file_in_partial_chunks) {
|
||||
auto nf = test::create_random_file(test_chunk_size * 32u);
|
||||
const auto download_source_path =
|
||||
test::generate_test_file_name("ring_buffer_open_file");
|
||||
const auto download_source_path = nf.get_path().string();
|
||||
|
||||
const auto dest_path = test::generate_test_file_name("ring_buffer_open_file");
|
||||
const auto dest_path = test::generate_test_file_name("test");
|
||||
|
||||
mock_provider mp;
|
||||
|
||||
@ -450,7 +449,7 @@ TEST(ring_buffer_open_file, read_full_file_in_partial_chunks) {
|
||||
fsi.directory = false;
|
||||
fsi.api_path = "/test.txt";
|
||||
fsi.size = test_chunk_size * 32u;
|
||||
fsi.source_path = test::generate_test_file_name("ring_buffer_open_file");
|
||||
fsi.source_path = test::generate_test_file_name("test");
|
||||
|
||||
EXPECT_CALL(mp, read_file_bytes)
|
||||
.WillRepeatedly([&nf](const std::string & /* api_path */,
|
||||
@ -471,6 +470,8 @@ TEST(ring_buffer_open_file, read_full_file_in_partial_chunks) {
|
||||
|
||||
auto nf2 = utils::file::file::open_or_create_file(dest_path);
|
||||
EXPECT_TRUE(nf2);
|
||||
// EXPECT_EQ(api_error::success, native_file::create_or_open(dest_path,
|
||||
// nf2));
|
||||
|
||||
auto total_read = std::uint64_t(0u);
|
||||
|
||||
@ -479,7 +480,8 @@ TEST(ring_buffer_open_file, read_full_file_in_partial_chunks) {
|
||||
EXPECT_EQ(api_error::success, rb.read(3u, total_read, data));
|
||||
|
||||
std::size_t bytes_written{};
|
||||
EXPECT_TRUE(nf2.write(data, total_read, &bytes_written));
|
||||
EXPECT_TRUE(
|
||||
nf2.write(data.data(), data.size(), total_read, &bytes_written));
|
||||
total_read += data.size();
|
||||
}
|
||||
nf2.close();
|
||||
|
Reference in New Issue
Block a user