mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix: support Glue BatchDeleteTable (#1209)
* fix: support Glue BatchDeleteTable * test: cover Glue BatchDeleteTable compatibility
This commit is contained in:
1 parent
3894ffcf8a
commit
1ea22d0f60
5 files changed
+161
-8
No files matched your search
@@ -482,6 +482,25 @@ class GlueServiceTest {
|
||||
() -> glueService.getTable("mixedcasedatabase", "mixedcasetabledeletedwithdatabase"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void batchDeleteTablesDeletesExistingTablesAndReportsMissingTables() {
|
||||
Table table = new Table();
|
||||
table.setName("existing");
|
||||
glueService.createTable("db1", table);
|
||||
|
||||
List<GlueService.BatchDeleteTableError> errors =
|
||||
glueService.batchDeleteTables("db1", List.of("existing", "missing"));
|
||||
|
||||
assertEquals(1, errors.size());
|
||||
assertEquals("missing", errors.get(0).tableName());
|
||||
GlueService.ErrorDetail errorDetail = errors.get(0).errorDetail();
|
||||
assertEquals("EntityNotFoundException", errorDetail.errorCode());
|
||||
assertEquals("Table missing not found", errorDetail.errorMessage());
|
||||
AwsException ex = assertThrows(AwsException.class,
|
||||
() -> glueService.getTable("db1", "existing"));
|
||||
assertEquals("EntityNotFoundException", ex.getErrorCode());
|
||||
}
|
||||
|
||||
@Test
|
||||
void getTableVersionsReturnsEmptyListForAthenaCompatibility() {
|
||||
assertTrue(glueService.getTableVersions().isEmpty());
|
||||
|
||||
Reference in new issue
Block a user