shahar1 commented on code in PR #60597:
URL: https://github.com/apache/airflow/pull/60597#discussion_r2787926278


##########
providers/amazon/tests/unit/amazon/aws/hooks/test_s3.py:
##########
@@ -1311,6 +1311,48 @@ def test_copy_object_ol_instrumentation(self, s3_bucket, 
hook_lineage_collector)
                 RequestPayer="requester",
             )
 
+    @mock_aws
+    def test_copy_object_with_kms_encryption(self, s3_bucket):
+        mock_hook = S3Hook()
+        with mock.patch.object(S3Hook, "get_conn") as get_conn:
+            mock_hook.copy_object(
+                "my_key",
+                "my_key_encrypted",
+                s3_bucket,
+                s3_bucket,
+                kms_key_id="arn:aws:kms:us-east-1:123456789012:key/abcd1234",
+                kms_encryption_type="aws:kms",
+            )
+            get_conn.return_value.copy_object.assert_called_once_with(
+                Bucket=s3_bucket,
+                Key="my_key_encrypted",
+                CopySource={"Bucket": s3_bucket, "Key": "my_key", "VersionId": 
None},
+                ACL="private",
+                SSEKMSKeyId="arn:aws:kms:us-east-1:123456789012:key/abcd1234",
+                ServerSideEncryption="aws:kms",
+            )
+
+    @mock_aws
+    def test_copy_object_with_kms_one_missing_raises(s3_bucket):

Review Comment:
   ```suggestion
       def test_copy_object_with_kms_one_missing_raises(self, s3_bucket):
   ```
   
   Interesting that the CI didn't fail until now because of that - could you 
please double-check?



-- 
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]

Reply via email to