Skip to content

Commit

Permalink
Merge branch 'main' into AB2D-6007/Update_reguest_file
Browse files Browse the repository at this point in the history
  • Loading branch information
smirnovaae authored Mar 13, 2024
2 parents 194b424 + c4d4233 commit 00da344
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ public void handleRequest(InputStream inputStream, OutputStream outputStream, Co
var parameterStore = AttributionParameterStore.getParameterStore();
AttributionDataShareHelper helper = helperInit(fileName, fileFullPath, logger);
try (var dbConnection = DriverManager.getConnection(parameterStore.getDbHost(), parameterStore.getDbUser(), parameterStore.getDbPassword())){

helper.copyDataToFile(dbConnection);
helper.writeFileToFinalDestination(getS3Client(ENDPOINT, parameterStore));

} catch (NullPointerException | URISyntaxException | SQLException ex) {
throwAttributionDataShareException(logger, ex);
} finally {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package gov.cms.ab2d.optout;

import com.amazonaws.services.lambda.runtime.Context;
import com.amazonaws.services.lambda.runtime.LambdaLogger;
import com.amazonaws.services.lambda.runtime.events.SQSEvent;
import com.amazonaws.services.s3.event.S3EventNotification;
Expand All @@ -21,7 +20,6 @@
import java.util.Collections;

import static gov.cms.ab2d.optout.OptOutConstantsTest.*;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.*;
Expand All @@ -41,7 +39,7 @@ public class OptOutHandlerTest {
static void beforeAll() throws URISyntaxException, IOException {
when(sqsEvent.getRecords()).thenReturn(Collections.singletonList(sqsMessage));
when(sqsMessage.getBody()).thenReturn(getPayload());
// when(handler.processorInit(any(LambdaLogger.class))).thenReturn(OPT_OUT_PROCESSOR);
when(handler.processorInit(any(LambdaLogger.class))).thenReturn(OPT_OUT_PROCESSOR);
}

@Test
Expand Down

0 comments on commit 00da344

Please sign in to comment.