[ 
https://issues.apache.org/jira/browse/CAMEL-5781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13494696#comment-13494696
 ] 

Massyl Nait commented on CAMEL-5781:
------------------------------------

we can't use mock (unit test) for PutObjectRequest, because it is instantiated 
inside process() method of s3Producer.
We can do integration testing by registering a fake implementation for 
AmazonS3Client (AmazonS3ClientMock).
even if we want to do assertion of what was set on PutObjectRequest in mock 
AmazonS3Client (for example using mockito) it is not possible because we have 
no control of PutObjectRequest instance that will be used (created in 
s3Producer).

                
> limitaions on s3 component. no means to specify acl on created object. 
> objects do not inherit acl from the bucket they belong to.
> ---------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5781
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5781
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-aws
>    Affects Versions: 2.10.2
>         Environment: all
>            Reporter: Massyl Nait
>            Assignee: Willem Jiang
>              Labels: patch
>         Attachments: camel-aws.patch
>
>
> When using s3 component to create new object on amazon bucket, there is no 
> means to specify acl that will be applied to this newly created object. s3 
> objects do not inherit acl applied to the bucket they belong to. 
> in s3 camel component (enpoint) we can specify bucket policy but not objects 
> acl.
> the limitation is in s3producer.
> there is an attachment file (patch) to fix this quickly and whith little 
> modifications to the existing code. but i think that we need to enhance the 
> design of this component to be more flexible and rely on strategy that 
> executes requests to interact with s3.
> for now there is no tests for s3producer in camel-aws thus i don't supply a 
> unit test.
> if we enhance the design we can change or improve this layer with less 
> effort. and we can do tests obviously.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to