jackye1995 commented on code in PR #6034: URL: https://github.com/apache/iceberg/pull/6034#discussion_r1003415094
########## python/tests/catalog/test_glue.py: ########## @@ -0,0 +1,252 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +import getpass as gt +import random +import string + +import pytest +from moto import mock_glue, mock_s3 + +from pyiceberg.catalog.glue import GlueCatalog +from pyiceberg.exceptions import NoSuchNamespaceError, NoSuchTableError +from pyiceberg.schema import Schema + +# early develop stage only, change this to a user with aws cli configured locally +MY_USERNAME = "jonasjiang" + + +def get_random_table_name(): + prefix = "my_iceberg_table-round3-" + random_tag = "".join(random.choice(string.ascii_letters) for _ in range(20)) + return (prefix + random_tag).lower() + + +def get_random_tables(n): + result = [] + for _ in range(n): + result.append(get_random_table_name()) + return result + + +def get_random_database_name(): + prefix = "my_iceberg_database-" + random_tag = "".join(random.choice(string.ascii_letters) for _ in range(20)) + return (prefix + random_tag).lower() + + [email protected](gt.getuser() != MY_USERNAME, reason="currently need aws account, will be unit test later") Review Comment: We can keep these tests and make them more formal integration tests, maybe use a flag `AWS_INTEGRATION_TEST_ENABLED` and if true then don't skip these tests, and get proper configurations of a AWS environment. -- 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]
