Skip to content

Commit

Permalink
Merge pull request #61 from shreelakshmijoshi/updating-build-pg-write…
Browse files Browse the repository at this point in the history
…-query

Updating build pg write query
  • Loading branch information
pranavrd authored May 8, 2024
2 parents c918714 + cf231a5 commit bb7b8a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public String buildPostgresWriteQuery(JsonObject request) {
String userId = request.getString(USER_ID);
String api = request.getString(API);
String method = request.getString(HTTP_METHOD);
String information = request.getString(INFORMATION);
JsonObject information = request.getJsonObject(INFORMATION);
String isoTime = request.getString(ISO_TIME);
String databaseTableName = config.getString(DMP_APD_PG_TABLE_NAME);

Expand All @@ -40,7 +40,7 @@ public String buildPostgresWriteQuery(JsonObject request) {
.replace("$2", userId)
.replace("$3", api)
.replace("$4", method)
.replace("$5", information)
.replace("$5", information.encode())
.replace("$6", utcTime.toString());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public void testForDmpSuccess(VertxTestContext vertxTestContext) {

String primaryKey = UUID.randomUUID().toString().replace("-", "");
String userId = UUID.randomUUID().toString();
String information = new JsonObject().put("policyId", UUID.randomUUID().toString()).put("createdAt", isoTime).put("policyStatus", "ACTIVE").encode();
JsonObject information = new JsonObject().put("policyId", UUID.randomUUID().toString()).put("createdAt", isoTime).put("policyStatus", "ACTIVE");
LOGGER.info("primary key is : {}", primaryKey);
when(config.getString(DMP_APD_PG_TABLE_NAME)).thenReturn("DMP_APD_PG_TABLE_NAME");
when(config.getString(DMP_APD_IMMUDB_TABLE_NAME)).thenReturn("DMP_APD_IMMUDB_TABLE_NAME");
Expand Down Expand Up @@ -198,7 +198,7 @@ public void testForDmpFailure(VertxTestContext vertxTestContext) {

String primaryKey = UUID.randomUUID().toString().replace("-", "");
String userId = UUID.randomUUID().toString();
String information = new JsonObject().put("policyId", UUID.randomUUID().toString()).put("createdAt", isoTime).put("policyStatus", "ACTIVE").encode();
JsonObject information = new JsonObject().put("policyId", UUID.randomUUID().toString()).put("createdAt", isoTime).put("policyStatus", "ACTIVE");
LOGGER.info("primary key is : {}", primaryKey);
when(config.getString(DMP_APD_PG_TABLE_NAME)).thenReturn("DMP_APD_PG_TABLE_NAME");
when(config.getString(DMP_APD_IMMUDB_TABLE_NAME)).thenReturn("DMP_APD_IMMUDB_TABLE_NAME");
Expand Down

0 comments on commit bb7b8a3

Please sign in to comment.