DaanHoogland commented on code in PR #10811: URL: https://github.com/apache/cloudstack/pull/10811#discussion_r2197303113
########## services/secondary-storage/server/src/test/java/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResourceTest.java: ########## @@ -241,4 +243,18 @@ public void getUploadProtocolTestReturnHttpWhenUseHttpsToUploadIsFalse() { Assert.assertEquals(NetUtils.HTTP_PROTO, result); } -} + + @Test + public void testExecuteRequestRedactsS3Credentials() { + S3TO mockS3 = Mockito.mock(S3TO.class); + DownloadCommand mockCmd = Mockito.mock(DownloadCommand.class); + + Mockito.when(mockCmd.getDataStore()).thenReturn(mockS3); + + resource.executeRequest(mockCmd); + + Mockito.verify(mockS3).setAccessKey("***REDACTED***"); + Mockito.verify(mockS3).setSecretKey("***REDACTED***"); + } + +} Review Comment: ```suggestion } ``` -- 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: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org