Skip to content

Commit 6514d09

Browse files
committed
fix: update TestInvalidList to expect global system table names
1 parent 633ce7b commit 6514d09

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"
@@ -606,8 +608,16 @@ TEST(FileSystemCatalogTest, TestInvalidList) {
606608
auto dir = UniqueTestDirectory::Create();
607609
ASSERT_TRUE(dir);
608610
FileSystemCatalog catalog(core_options.GetFileSystem(), dir->Str());
609-
ASSERT_NOK_WITH_MSG(catalog.ListTables("sys"),
610-
"do not support listing tables for system database.");
611+
ASSERT_OK_AND_ASSIGN(auto sys_tables, catalog.ListTables("sys"));
612+
ASSERT_FALSE(sys_tables.empty());
613+
// Verify expected global system table names are present
614+
ASSERT_TRUE(std::find(sys_tables.begin(), sys_tables.end(), "catalog_options") !=
615+
sys_tables.end());
616+
ASSERT_TRUE(std::find(sys_tables.begin(), sys_tables.end(), "all_table_options") !=
617+
sys_tables.end());
618+
ASSERT_TRUE(std::find(sys_tables.begin(), sys_tables.end(), "tables") != sys_tables.end());
619+
ASSERT_TRUE(std::find(sys_tables.begin(), sys_tables.end(), "partitions") !=
620+
sys_tables.end());
611621
}
612622

613623
TEST(FileSystemCatalogTest, TestValidateTableSchema) {

0 commit comments

Comments
 (0)