Skip to content

Commit f8f1ec5

Browse files
committed
Remove encrypted-at-rest catalog from tests.
1 parent 99bba9f commit f8f1ec5

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

cloudformation/databases.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,7 @@ Resources:
369369
Fn::ImportValue: aws-data-wrangler-base-KmsKeyArn
370370
ReturnConnectionPasswordEncrypted: true
371371
EncryptionAtRest:
372-
CatalogEncryptionMode: SSE-KMS
373-
SseAwsKmsKeyId:
374-
Fn::ImportValue: aws-data-wrangler-base-KmsKeyArn
372+
CatalogEncryptionMode: DISABLED
375373
Outputs:
376374
DatabasesPassword:
377375
Value:

tests/_utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import time
33
from datetime import datetime
44
from decimal import Decimal
5+
from typing import Iterator
56

67
import boto3
78
import botocore.exceptions
@@ -507,12 +508,12 @@ def ensure_athena_query_metadata(df, ctas_approach=True, encrypted=False):
507508
assert df.query_metadata["Statistics"]["DataManifestLocation"] is not None
508509

509510

510-
def get_time_str_with_random_suffix():
511+
def get_time_str_with_random_suffix() -> str:
511512
time_str = datetime.utcnow().strftime("%Y%m%d%H%M%S%f")
512513
return f"{time_str}_{random.randrange(16**6):06x}"
513514

514515

515-
def path_generator(bucket):
516+
def path_generator(bucket: str) -> Iterator[str]:
516517
s3_path = f"s3://{bucket}/{get_time_str_with_random_suffix()}/"
517518
print(f"S3 Path: {s3_path}")
518519
time.sleep(1)

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def redshift_external_schema(cloudformation_outputs, databases_parameters, glue_
165165

166166

167167
@pytest.fixture(scope="function")
168-
def glue_table(glue_database):
168+
def glue_table(glue_database: str) -> None:
169169
name = f"tbl_{get_time_str_with_random_suffix()}"
170170
print(f"Table name: {name}")
171171
wr.catalog.delete_table_if_exists(database=glue_database, table=name)

tests/test_athena.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def test_athena(path, glue_database, glue_table, kms_key, workgroup0, workgroup1
173173
wr.catalog.delete_table_if_exists(database=glue_database, table=table)
174174

175175

176-
def test_catalog(path, glue_database, glue_table):
176+
def test_catalog(path: str, glue_database: str, glue_table: str) -> None:
177177
account_id = boto3.client("sts").get_caller_identity().get("Account")
178178
assert wr.catalog.does_table_exist(database=glue_database, table=glue_table) is False
179179
wr.catalog.create_parquet_table(

0 commit comments

Comments
 (0)