Skip to content

Commit f612a09

Browse files
committed
fix: update TestInvalidList to expect global system table names
1 parent cddd24a commit f612a09

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

src/paimon/core/catalog/file_system_catalog_test.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
#include "paimon/core/catalog/file_system_catalog.h"
1818

19+
#include <algorithm>
20+
1921
#include "arrow/api.h"
2022
#include "arrow/c/abi.h"
2123
#include "arrow/c/bridge.h"
@@ -557,8 +559,16 @@ TEST(FileSystemCatalogTest, TestInvalidList) {
557559
auto dir = UniqueTestDirectory::Create();
558560
ASSERT_TRUE(dir);
559561
FileSystemCatalog catalog(core_options.GetFileSystem(), dir->Str());
560-
ASSERT_NOK_WITH_MSG(catalog.ListTables("sys"),
561-
"do not support listing tables for system database.");
562+
ASSERT_OK_AND_ASSIGN(auto sys_tables, catalog.ListTables("sys"));
563+
ASSERT_FALSE(sys_tables.empty());
564+
// Verify expected global system table names are present
565+
ASSERT_TRUE(std::find(sys_tables.begin(), sys_tables.end(), "catalog_options") !=
566+
sys_tables.end());
567+
ASSERT_TRUE(std::find(sys_tables.begin(), sys_tables.end(), "all_table_options") !=
568+
sys_tables.end());
569+
ASSERT_TRUE(std::find(sys_tables.begin(), sys_tables.end(), "tables") != sys_tables.end());
570+
ASSERT_TRUE(std::find(sys_tables.begin(), sys_tables.end(), "partitions") !=
571+
sys_tables.end());
562572
}
563573

564574
TEST(FileSystemCatalogTest, TestValidateTableSchema) {

0 commit comments

Comments
 (0)