lishuxu commented on code in PR #142:
URL: https://github.com/apache/iceberg-cpp/pull/142#discussion_r2204247772
##########
test/in_memory_catalog_test.cc:
##########
@@ -58,6 +75,21 @@ TEST_F(InMemoryCatalogTest, TableExists) {
EXPECT_THAT(result, HasValue(::testing::Eq(false)));
}
+TEST_F(InMemoryCatalogTest, RegisterTable) {
+ TableIdentifier tableIdent{.ns = {}, .name = "t1"};
+
+ std::unique_ptr<TableMetadata> metadata;
+ ASSERT_NO_FATAL_FAILURE(ReadTableMetadata("TableMetadataV2Valid.json",
&metadata));
+
+ auto status = TableMetadataUtil::Write(*file_io_, temp_filepath_, *metadata);
+ EXPECT_THAT(status, IsOk());
+
+ auto table = catalog_->RegisterTable(tableIdent, temp_filepath_);
Review Comment:
The test program needs to use a temporary path to save the .metadata.json
file, so it is not suitable to write it directly into the resources directory
where TableMetadataV2Valid.json is stored.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]