@@ -57,7 +57,7 @@ def test_create_table_with_database_location(
5757 catalog_name = "glue"
5858 identifier = (database_name , table_name )
5959 test_catalog = GlueCatalog (catalog_name , ** {"s3.endpoint" : moto_endpoint_url })
60- test_catalog .create_namespace (namespace = database_name , properties = {"location" : f"s3://{ BUCKET_NAME } /{ database_name } .db " })
60+ test_catalog .create_namespace (namespace = database_name , properties = {"location" : f"s3://{ BUCKET_NAME } /{ database_name } " })
6161 table = test_catalog .create_table (identifier , table_schema_nested )
6262 assert table .name () == identifier
6363 assert TABLE_METADATA_LOCATION_REGEX .match (table .metadata_location )
@@ -77,7 +77,7 @@ def test_create_table_with_database_location(
7777 "Parameters" : {"iceberg.field.id" : "1" , "iceberg.field.optional" : "true" , "iceberg.field.current" : "true" },
7878 }
7979
80- assert storage_descriptor ["Location" ] == f"s3://{ BUCKET_NAME } /{ database_name } .db /{ table_name } "
80+ assert storage_descriptor ["Location" ] == f"s3://{ BUCKET_NAME } /{ database_name } /{ table_name } "
8181
8282
8383@mock_aws
@@ -91,7 +91,7 @@ def test_create_v1_table(
9191) -> None :
9292 catalog_name = "glue"
9393 test_catalog = GlueCatalog (catalog_name , ** {"s3.endpoint" : moto_endpoint_url })
94- test_catalog .create_namespace (namespace = database_name , properties = {"location" : f"s3://{ BUCKET_NAME } /{ database_name } .db " })
94+ test_catalog .create_namespace (namespace = database_name , properties = {"location" : f"s3://{ BUCKET_NAME } /{ database_name } " })
9595 table = test_catalog .create_table ((database_name , table_name ), table_schema_nested , properties = {"format-version" : "1" })
9696 assert table .format_version == 1
9797
@@ -109,7 +109,7 @@ def test_create_v1_table(
109109 "Parameters" : {"iceberg.field.id" : "1" , "iceberg.field.optional" : "true" , "iceberg.field.current" : "true" },
110110 }
111111
112- assert storage_descriptor ["Location" ] == f"s3://{ BUCKET_NAME } /{ database_name } .db /{ table_name } "
112+ assert storage_descriptor ["Location" ] == f"s3://{ BUCKET_NAME } /{ database_name } /{ table_name } "
113113
114114
115115@mock_aws
@@ -135,7 +135,7 @@ def test_create_table_with_given_location(
135135 test_catalog = GlueCatalog (catalog_name , ** {"s3.endpoint" : moto_endpoint_url })
136136 test_catalog .create_namespace (namespace = database_name )
137137 table = test_catalog .create_table (
138- identifier = identifier , schema = table_schema_nested , location = f"s3://{ BUCKET_NAME } /{ database_name } .db /{ table_name } "
138+ identifier = identifier , schema = table_schema_nested , location = f"s3://{ BUCKET_NAME } /{ database_name } /{ table_name } "
139139 )
140140 assert table .name () == identifier
141141 assert TABLE_METADATA_LOCATION_REGEX .match (table .metadata_location )
@@ -150,7 +150,7 @@ def test_create_table_removes_trailing_slash_in_location(
150150 identifier = (database_name , table_name )
151151 test_catalog = GlueCatalog (catalog_name , ** {"s3.endpoint" : moto_endpoint_url })
152152 test_catalog .create_namespace (namespace = database_name )
153- location = f"s3://{ BUCKET_NAME } /{ database_name } .db /{ table_name } "
153+ location = f"s3://{ BUCKET_NAME } /{ database_name } /{ table_name } "
154154 table = test_catalog .create_table (identifier = identifier , schema = table_schema_nested , location = f"{ location } /" )
155155 assert table .name () == identifier
156156 assert table .location () == location
@@ -173,7 +173,7 @@ def test_create_table_with_pyarrow_schema(
173173 table = test_catalog .create_table (
174174 identifier = identifier ,
175175 schema = pyarrow_schema_simple_without_ids ,
176- location = f"s3://{ BUCKET_NAME } /{ database_name } .db /{ table_name } " ,
176+ location = f"s3://{ BUCKET_NAME } /{ database_name } /{ table_name } " ,
177177 )
178178 assert table .name () == identifier
179179 assert TABLE_METADATA_LOCATION_REGEX .match (table .metadata_location )
@@ -199,7 +199,7 @@ def test_create_table_with_strips(
199199 catalog_name = "glue"
200200 identifier = (database_name , table_name )
201201 test_catalog = GlueCatalog (catalog_name , ** {"s3.endpoint" : moto_endpoint_url })
202- test_catalog .create_namespace (namespace = database_name , properties = {"location" : f"s3://{ BUCKET_NAME } /{ database_name } .db /" })
202+ test_catalog .create_namespace (namespace = database_name , properties = {"location" : f"s3://{ BUCKET_NAME } /{ database_name } /" })
203203 table = test_catalog .create_table (identifier , table_schema_nested )
204204 assert table .name () == identifier
205205 assert TABLE_METADATA_LOCATION_REGEX .match (table .metadata_location )
@@ -497,7 +497,7 @@ def test_create_namespace_no_properties(_bucket_initialize: None, moto_endpoint_
497497
498498@mock_aws
499499def test_create_namespace_with_comment_and_location (_bucket_initialize : None , moto_endpoint_url : str , database_name : str ) -> None :
500- test_location = f"s3://{ BUCKET_NAME } /{ database_name } .db "
500+ test_location = f"s3://{ BUCKET_NAME } /{ database_name } "
501501 test_properties = {
502502 "comment" : "this is a test description" ,
503503 "location" : test_location ,
@@ -557,7 +557,7 @@ def test_drop_non_exist_namespace(_bucket_initialize: None, moto_endpoint_url: s
557557
558558@mock_aws
559559def test_load_namespace_properties (_bucket_initialize : None , moto_endpoint_url : str , database_name : str ) -> None :
560- test_location = f"s3://{ BUCKET_NAME } /{ database_name } .db "
560+ test_location = f"s3://{ BUCKET_NAME } /{ database_name } "
561561 test_properties = {
562562 "comment" : "this is a test description" ,
563563 "location" : test_location ,
@@ -584,7 +584,7 @@ def test_load_non_exist_namespace_properties(_bucket_initialize: None, moto_endp
584584def test_update_namespace_properties (_bucket_initialize : None , moto_endpoint_url : str , database_name : str ) -> None :
585585 test_properties = {
586586 "comment" : "this is a test description" ,
587- "location" : f"s3://{ BUCKET_NAME } /{ database_name } .db " ,
587+ "location" : f"s3://{ BUCKET_NAME } /{ database_name } " ,
588588 "test_property1" : "1" ,
589589 "test_property2" : "2" ,
590590 "test_property3" : "3" ,
@@ -628,7 +628,7 @@ def test_update_namespace_properties_overlap_update_removal(
628628) -> None :
629629 test_properties = {
630630 "comment" : "this is a test description" ,
631- "location" : f"s3://{ BUCKET_NAME } /{ database_name } .db " ,
631+ "location" : f"s3://{ BUCKET_NAME } /{ database_name } " ,
632632 "test_property1" : "1" ,
633633 "test_property2" : "2" ,
634634 "test_property3" : "3" ,
@@ -745,7 +745,7 @@ def test_commit_table_update_schema(
745745 "Type" : "int" ,
746746 "Parameters" : {"iceberg.field.id" : "18" , "iceberg.field.optional" : "true" , "iceberg.field.current" : "true" },
747747 }
748- assert storage_descriptor ["Location" ] == f"s3://{ BUCKET_NAME } /{ database_name } .db /{ table_name } "
748+ assert storage_descriptor ["Location" ] == f"s3://{ BUCKET_NAME } /{ database_name } /{ table_name } "
749749
750750
751751@mock_aws
@@ -918,7 +918,7 @@ def test_register_table_with_given_location(
918918 identifier = (database_name , table_name )
919919 location = metadata_location
920920 test_catalog = GlueCatalog (catalog_name , ** {"s3.endpoint" : moto_endpoint_url , "warehouse" : f"s3://{ BUCKET_NAME } " })
921- test_catalog .create_namespace (namespace = database_name , properties = {"location" : f"s3://{ BUCKET_NAME } /{ database_name } .db " })
921+ test_catalog .create_namespace (namespace = database_name , properties = {"location" : f"s3://{ BUCKET_NAME } /{ database_name } " })
922922 table = test_catalog .register_table (identifier , location )
923923 assert table .name () == identifier
924924 assert test_catalog .table_exists (identifier ) is True
0 commit comments