Add glue.batch_delete_table, and fix glue.batch_create_partition to respond correctly (#2233)
* Fix glue.batch_create_partition to only respond with Errors if Errors occurred * Add glue.batch_delete_table endpoint * Remove unused variable
This commit is contained in:
parent
ab8a189bbf
commit
df493ea18d
2 changed files with 49 additions and 2 deletions
|
|
@ -229,6 +229,26 @@ def test_delete_table():
|
|||
exc.exception.response['Error']['Code'].should.equal('EntityNotFoundException')
|
||||
exc.exception.response['Error']['Message'].should.match('Table myspecialtable not found')
|
||||
|
||||
@mock_glue
|
||||
def test_batch_delete_table():
|
||||
client = boto3.client('glue', region_name='us-east-1')
|
||||
database_name = 'myspecialdatabase'
|
||||
helpers.create_database(client, database_name)
|
||||
|
||||
table_name = 'myspecialtable'
|
||||
table_input = helpers.create_table_input(database_name, table_name)
|
||||
helpers.create_table(client, database_name, table_name, table_input)
|
||||
|
||||
result = client.batch_delete_table(DatabaseName=database_name, TablesToDelete=[table_name])
|
||||
result['ResponseMetadata']['HTTPStatusCode'].should.equal(200)
|
||||
|
||||
# confirm table is deleted
|
||||
with assert_raises(ClientError) as exc:
|
||||
helpers.get_table(client, database_name, table_name)
|
||||
|
||||
exc.exception.response['Error']['Code'].should.equal('EntityNotFoundException')
|
||||
exc.exception.response['Error']['Message'].should.match('Table myspecialtable not found')
|
||||
|
||||
|
||||
@mock_glue
|
||||
def test_get_partitions_empty():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue