MehulBatra commented on code in PR #711:
URL: https://github.com/apache/iceberg-python/pull/711#discussion_r1607758533
##########
tests/catalog/test_glue.py:
##########
@@ -848,3 +848,17 @@ def test_table_exists(
assert test_catalog.table_exists(identifier) is True
# Act and Assert for a non-existing table
assert test_catalog.table_exists(('non', 'exist')) is False
+
+
+@mock_aws
+def test_register_table_with_given_location(
+ _bucket_initialize: None, moto_endpoint_url: str, metadata_location: str,
database_name: str, table_name: str
+) -> None:
+ catalog_name = "glue"
+ identifier = (database_name, table_name)
+ location = metadata_location
+ test_catalog = GlueCatalog(catalog_name, **{"s3.endpoint":
moto_endpoint_url, "warehouse": f"s3://{BUCKET_NAME}"})
+ test_catalog.create_namespace(namespace=database_name,
properties={"location": f"s3://{BUCKET_NAME}/{database_name}.db"})
+ table = test_catalog.register_table(identifier, location)
+ assert table.identifier == (catalog_name,) + identifier
+ assert test_catalog.table_exists(identifier) is True
Review Comment:
Seems like an issue on my local, it is running fine on git actions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]