diff --git a/terraform/environments/data-platform/tests/run_smoke_tests.py b/terraform/environments/data-platform/tests/run_smoke_tests.py index fef13c42c96..37de99eb1c6 100644 --- a/terraform/environments/data-platform/tests/run_smoke_tests.py +++ b/terraform/environments/data-platform/tests/run_smoke_tests.py @@ -1,10 +1,12 @@ import base64 import hashlib -import requests import json -import boto3 +import requests +import sys import time +import boto3 + file_path = "test_data.csv" database = "test_product5" table = "testing" @@ -43,19 +45,19 @@ def md5_hash_file_contents(file) -> str: upload_response = requests.post(response_json["URL"]["url"], files=multipart_form_data) print(upload_response.status_code, upload_response.text) -print(f"Waiting for {database}.{table} to create in athena") +print(f"Waiting for {data_product_name}.{table_name} to create in athena") time.sleep(10) # Check for created table try: - glue.get_table(DatabaseName=database, Name=table) - print(f"{database}.{table} found in glue") + glue.get_table(data_product_nameName=data_product_name, Name=table_name) + print(f"{data_product_name}.{table_name} found in glue") except Exception as e: raise e # Clean up created table try: - glue.delete_table(DatabaseName=database, Name=table) - print(f"{database}.{table} deleted from glue") + glue.delete_table(data_product_nameName=data_product_name, Name=table_name) + print(f"{data_product_name}.{table_name} deleted from glue") except Exception as e: raise e