Skip to content

Commit

Permalink
fixup! Add test for Faker connector renameTable
Browse files Browse the repository at this point in the history
  • Loading branch information
sthandassery committed Dec 31, 2024
1 parent 9f2e826 commit f5c25ca
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,10 @@ void testRenameTable()
{
assertUpdate("CREATE TABLE faker.default.original_table (id INTEGER, name VARCHAR)");
assertUpdate("ALTER TABLE faker.default.original_table RENAME TO faker.default.renamed_table");
// original_table should not exist anymore after renaming.
assertQueryFails("DESC faker.default.original_table", "line 1:1: Table 'faker.default.original_table' does not exist");
// should not allow renaming to an already existing table.
assertQueryFails("ALTER TABLE faker.default.renamed_table RENAME TO faker.default.renamed_table", "line 1:1: Target table 'faker.default.renamed_table' already exists");
assertUpdate("DROP TABLE faker.default.renamed_table");
}
}

0 comments on commit f5c25ca

Please sign in to comment.