SHARE
TWEET

Untitled

a guest Aug 23rd, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. TEST_F(CloudStorageFsTest, GetFileInfoSetsFields) {
  2.   // Create GCS placeholder "ghost" file
  3.   ASSERT_EQ(STATUS_SUCCESS,
  4.             fs_->GetSecurityByName(const_cast<PWSTR>(kTestFileName),
  5.                                    &file_attributes_, security_descriptor_,
  6.                                    &security_descriptor_size_));
  7.  
  8.   CloudStorageFs::FileDescription* file_description;
  9.   Fsp::FileSystemBase::OpenFileInfo open_file_info;
  10.  
  11.   ASSERT_EQ(STATUS_SUCCESS,
  12.             fs_->Open(const_cast<PWSTR>(kTestFileName), /*create_options=*/0,
  13.                       /*granted_access=*/0, /*file_node=*/nullptr,
  14.                       reinterpret_cast<PVOID*>(&file_description), &open_file_info));
  15.  
  16.   std::unique_ptr<CloudStorageFs::FileDescription> file_description_deleter(
  17.       file_description);
  18.  
  19.  
  20.   Fsp::FileSystemBase::FileInfo file_info;
  21.   ASSERT_EQ(STATUS_SUCCESS, fs_->GetFileInfo(/*file_node=*/nullptr, file_description, &file_info));
  22.  
  23.   // Matches file on GCS
  24.   const std::string text = "hello world\n";
  25.   ASSERT_EQ(file_info.FileSize, text.size());
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top