| 734 | |
| 735 | template <typename Matcher> |
| 736 | void AssertMetadataRoundtrip(const std::string& path, |
| 737 | const std::shared_ptr<const KeyValueMetadata>& metadata, |
| 738 | Matcher&& matcher) { |
| 739 | ASSERT_OK_AND_ASSIGN(auto output, fs_->OpenOutputStream(path, metadata)); |
| 740 | ASSERT_OK(output->Close()); |
| 741 | ASSERT_OK_AND_ASSIGN(auto input, fs_->OpenInputStream(path)); |
| 742 | ASSERT_OK_AND_ASSIGN(auto got_metadata, input->ReadMetadata()); |
| 743 | ASSERT_NE(got_metadata, nullptr); |
| 744 | ASSERT_THAT(got_metadata->sorted_pairs(), matcher); |
| 745 | } |
| 746 | |
| 747 | void AssertInfoAllBucketsRecursive(const std::vector<FileInfo>& infos) { |
| 748 | AssertFileInfo(infos[0], "bucket", FileType::Directory); |
no test coverage detected