fix test
This commit is contained in:
		| @@ -280,7 +280,7 @@ static void test_ftruncate(const std::string &file_path) { | |||||||
|  |  | ||||||
| #ifndef __APPLE__ | #ifndef __APPLE__ | ||||||
| static void test_fallocate(const std::string &api_path, | static void test_fallocate(const std::string &api_path, | ||||||
|                            const std::string &file_path, i_provider &provider) { |                            const std::string &file_path) { | ||||||
|   std::cout << __FUNCTION__ << std::endl; |   std::cout << __FUNCTION__ << std::endl; | ||||||
|   auto file = |   auto file = | ||||||
|       open(file_path.c_str(), O_CREAT | O_RDWR, S_IRUSR | S_IWUSR | S_IRGRP); |       open(file_path.c_str(), O_CREAT | O_RDWR, S_IRUSR | S_IWUSR | S_IRGRP); | ||||||
| @@ -296,11 +296,6 @@ static void test_fallocate(const std::string &api_path, | |||||||
|   file_size = 0U; |   file_size = 0U; | ||||||
|   EXPECT_TRUE(utils::file::get_file_size(file_path, file_size)); |   EXPECT_TRUE(utils::file::get_file_size(file_path, file_size)); | ||||||
|   EXPECT_EQ(16U, file_size); |   EXPECT_EQ(16U, file_size); | ||||||
|  |  | ||||||
|   filesystem_item fsi{}; |  | ||||||
|   EXPECT_EQ(api_error::success, |  | ||||||
|             provider.get_filesystem_item(api_path, false, fsi)); |  | ||||||
|   EXPECT_EQ(16U, fsi.size); |  | ||||||
| } | } | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| @@ -631,7 +626,7 @@ TEST(fuse_drive, all_tests) { | |||||||
| #ifndef __APPLE__ | #ifndef __APPLE__ | ||||||
|         file_path = create_file_and_test(mount_location, "fallocate_file_test"); |         file_path = create_file_and_test(mount_location, "fallocate_file_test"); | ||||||
|         test_fallocate(utils::path::create_api_path("fallocate_file_test"), |         test_fallocate(utils::path::create_api_path("fallocate_file_test"), | ||||||
|                        file_path, *provider_ptr); |                        file_path); | ||||||
|         unlink_file_and_test(file_path); |         unlink_file_and_test(file_path); | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user