From 9dc1160c069655995062176094fd6b53a35389f4 Mon Sep 17 00:00:00 2001 From: "Dr. Ernie Prabhakar" <19791+drernie@users.noreply.github.com> Date: Fri, 27 Dec 2024 16:45:55 -0800 Subject: [PATCH] pkg.build --- api/python/quilt3/data_transfer.py | 2 -- api/python/tests/integration/test_put_options.py | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api/python/quilt3/data_transfer.py b/api/python/quilt3/data_transfer.py index d552f101b7b..d5ca59596c7 100644 --- a/api/python/quilt3/data_transfer.py +++ b/api/python/quilt3/data_transfer.py @@ -58,13 +58,11 @@ def add_put_options_safely(params: dict, put_options: Optional[dict]): Add put options to the params dictionary safely. This method ensures that the put options do not overwrite existing keys in the params dictionary. """ - print(f"add_put_options_safely.put_options: {put_options}") if put_options: for key, value in put_options.items(): if key in params: raise ValueError(f"Cannot override key `{key}` using put_options: {put_options}.") params[key] = value - print(f"add_put_options_safely.PARAMS: {params}") class S3Api(Enum): diff --git a/api/python/tests/integration/test_put_options.py b/api/python/tests/integration/test_put_options.py index 8354012132d..40c8083063c 100644 --- a/api/python/tests/integration/test_put_options.py +++ b/api/python/tests/integration/test_put_options.py @@ -81,9 +81,13 @@ def test_package_push(): pkg = Package() pkg.set(TEST_FILE, TEST_SRC) + with raises(ClientError, match=ERR_MSG): + pkg.build(pkg_name, TEST_BUCKET_URI) + with raises(ClientError, match=ERR_MSG): pkg.push(pkg_name, TEST_BUCKET_URI, force=True) + pkg.build(pkg_name, TEST_BUCKET_URI, put_options=USE_KMS) pkg.push(pkg_name, TEST_BUCKET_URI, put_options=USE_KMS, force=True) # Use boto3 to verify the object was uploaded with the correct encryption