Tony Kurc created NIFI-1126:
-------------------------------

             Summary: DeleteS3Object unit test is wrong, or processor behavior 
is wrong
                 Key: NIFI-1126
                 URL: https://issues.apache.org/jira/browse/NIFI-1126
             Project: Apache NiFi
          Issue Type: Bug
          Components: Extensions
    Affects Versions: 0.3.0
            Reporter: Tony Kurc
            Assignee: Tony Kurc
            Priority: Minor
             Fix For: 0.4.0


Was testing pr and amendments for NIFI-1025. I believe the existing Unit test 
[1] expects flowfile to be routed to failure when a key did not exist. The 
processor does not do this. It calls deleteObject, and the method docs state 
"If attempting to delete an object that does not exist, Amazon S3 returns a 
success message instead of an error message." [3]

Adjust the docs and unit tests to reflect the behavior, as changing would be 
not backwards compatible. Consider adding a property to fail if file not found.

[1] 
https://github.com/apache/nifi/blob/49ee06b0a256b9b4b7550acccb6facceb3c31c21/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/s3/TestDeleteS3Object.java#L129

[2] 
https://github.com/apache/nifi/blob/49ee06b0a256b9b4b7550acccb6facceb3c31c21/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/s3/DeleteS3Object.java#L83

[3] 
http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/AmazonS3.html#deleteObject(java.lang.String,%20java.lang.String)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to