exceptionfactory commented on code in PR #11626:
URL: https://github.com/apache/nifi/pull/11626#discussion_r3934956042
##########
nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/s3/TestCopyS3Object.java:
##########
@@ -52,6 +55,12 @@ public class TestCopyS3Object {
@BeforeEach
void setUp() {
mockS3Client = mock(S3Client.class);
+ final S3Utilities mockS3Utilities = mock(S3Utilities.class);
+ when(mockS3Client.utilities()).thenReturn(mockS3Utilities);
+
when(mockS3Utilities.getUrl(any(GetUrlRequest.class))).thenAnswer(invocation ->
{
+ final GetUrlRequest request = invocation.getArgument(0);
+ return new
URL("https://%s.s3.amazonaws.com/%s".formatted(request.bucket(),
request.key()));
+ });
Review Comment:
@kwizart The other tests use a real `S3Utilities`, is there a reason that
approach cannot be used here?
--
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]