@@ -57,7 +57,7 @@ def test_create_table_with_database_location(
57
57
catalog_name = "glue"
58
58
identifier = (database_name , table_name )
59
59
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 } " })
61
61
table = test_catalog .create_table (identifier , table_schema_nested )
62
62
assert table .name () == identifier
63
63
assert TABLE_METADATA_LOCATION_REGEX .match (table .metadata_location )
@@ -77,7 +77,7 @@ def test_create_table_with_database_location(
77
77
"Parameters" : {"iceberg.field.id" : "1" , "iceberg.field.optional" : "true" , "iceberg.field.current" : "true" },
78
78
}
79
79
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 } "
81
81
82
82
83
83
@mock_aws
@@ -91,7 +91,7 @@ def test_create_v1_table(
91
91
) -> None :
92
92
catalog_name = "glue"
93
93
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 } " })
95
95
table = test_catalog .create_table ((database_name , table_name ), table_schema_nested , properties = {"format-version" : "1" })
96
96
assert table .format_version == 1
97
97
@@ -109,7 +109,7 @@ def test_create_v1_table(
109
109
"Parameters" : {"iceberg.field.id" : "1" , "iceberg.field.optional" : "true" , "iceberg.field.current" : "true" },
110
110
}
111
111
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 } "
113
113
114
114
115
115
@mock_aws
@@ -135,7 +135,7 @@ def test_create_table_with_given_location(
135
135
test_catalog = GlueCatalog (catalog_name , ** {"s3.endpoint" : moto_endpoint_url })
136
136
test_catalog .create_namespace (namespace = database_name )
137
137
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 } "
139
139
)
140
140
assert table .name () == identifier
141
141
assert TABLE_METADATA_LOCATION_REGEX .match (table .metadata_location )
@@ -150,7 +150,7 @@ def test_create_table_removes_trailing_slash_in_location(
150
150
identifier = (database_name , table_name )
151
151
test_catalog = GlueCatalog (catalog_name , ** {"s3.endpoint" : moto_endpoint_url })
152
152
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 } "
154
154
table = test_catalog .create_table (identifier = identifier , schema = table_schema_nested , location = f"{ location } /" )
155
155
assert table .name () == identifier
156
156
assert table .location () == location
@@ -173,7 +173,7 @@ def test_create_table_with_pyarrow_schema(
173
173
table = test_catalog .create_table (
174
174
identifier = identifier ,
175
175
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 } " ,
177
177
)
178
178
assert table .name () == identifier
179
179
assert TABLE_METADATA_LOCATION_REGEX .match (table .metadata_location )
@@ -199,7 +199,7 @@ def test_create_table_with_strips(
199
199
catalog_name = "glue"
200
200
identifier = (database_name , table_name )
201
201
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 } /" })
203
203
table = test_catalog .create_table (identifier , table_schema_nested )
204
204
assert table .name () == identifier
205
205
assert TABLE_METADATA_LOCATION_REGEX .match (table .metadata_location )
@@ -497,7 +497,7 @@ def test_create_namespace_no_properties(_bucket_initialize: None, moto_endpoint_
497
497
498
498
@mock_aws
499
499
def 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 } "
501
501
test_properties = {
502
502
"comment" : "this is a test description" ,
503
503
"location" : test_location ,
@@ -557,7 +557,7 @@ def test_drop_non_exist_namespace(_bucket_initialize: None, moto_endpoint_url: s
557
557
558
558
@mock_aws
559
559
def 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 } "
561
561
test_properties = {
562
562
"comment" : "this is a test description" ,
563
563
"location" : test_location ,
@@ -584,7 +584,7 @@ def test_load_non_exist_namespace_properties(_bucket_initialize: None, moto_endp
584
584
def test_update_namespace_properties (_bucket_initialize : None , moto_endpoint_url : str , database_name : str ) -> None :
585
585
test_properties = {
586
586
"comment" : "this is a test description" ,
587
- "location" : f"s3://{ BUCKET_NAME } /{ database_name } .db " ,
587
+ "location" : f"s3://{ BUCKET_NAME } /{ database_name } " ,
588
588
"test_property1" : "1" ,
589
589
"test_property2" : "2" ,
590
590
"test_property3" : "3" ,
@@ -628,7 +628,7 @@ def test_update_namespace_properties_overlap_update_removal(
628
628
) -> None :
629
629
test_properties = {
630
630
"comment" : "this is a test description" ,
631
- "location" : f"s3://{ BUCKET_NAME } /{ database_name } .db " ,
631
+ "location" : f"s3://{ BUCKET_NAME } /{ database_name } " ,
632
632
"test_property1" : "1" ,
633
633
"test_property2" : "2" ,
634
634
"test_property3" : "3" ,
@@ -745,7 +745,7 @@ def test_commit_table_update_schema(
745
745
"Type" : "int" ,
746
746
"Parameters" : {"iceberg.field.id" : "18" , "iceberg.field.optional" : "true" , "iceberg.field.current" : "true" },
747
747
}
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 } "
749
749
750
750
751
751
@mock_aws
@@ -918,7 +918,7 @@ def test_register_table_with_given_location(
918
918
identifier = (database_name , table_name )
919
919
location = metadata_location
920
920
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 } " })
922
922
table = test_catalog .register_table (identifier , location )
923
923
assert table .name () == identifier
924
924
assert test_catalog .table_exists (identifier ) is True
0 commit comments