Commit 295ac63b authored by harshit aggarwal's avatar harshit aggarwal
Browse files

PR comments

parent 67a2c332
Pipeline #8188 failed with stage
in 2 minutes and 3 seconds
......@@ -351,7 +351,7 @@ public class IntegrationTestStepDefs implements En {
payload = new Gson().toJson(jsonBody);
this.context.setInputPayload(payload);
// Changing environment variable name to STORAGE_URL to maintain consistency in naming
String storageURL = System.getProperty("STORAGE_URL", System.getenv("STORAGE_URL")).replaceFirst("/*$", "");
String storageURL = System.getProperty("STORAGE_URL", System.getenv("STORAGE_URL")).replaceAll("/$", "");
HttpRequest httpRequest = HttpRequest.builder().url(storageURL + AutomationConstants.POST_ENDPOINT)
.body(jsonBody.toString()).httpMethod(HttpRequest.PUT).requestHeaders(this.context.getAuthHeaders())
.build();
......@@ -361,7 +361,7 @@ public class IntegrationTestStepDefs implements En {
}
private void deleteFromStorage(String recordId) {
String storageURL = System.getProperty("STORAGE_URL", System.getenv("STORAGE_URL")).replaceFirst("/*$", "")
String storageURL = System.getProperty("STORAGE_URL", System.getenv("STORAGE_URL")).replaceAll("/$", "")
+ AutomationConstants.DELETE_ENDPOINT + recordId;
HttpRequest httpRequest = HttpRequest.builder().url(storageURL)
......@@ -378,7 +378,7 @@ public class IntegrationTestStepDefs implements En {
}
private String storageGetResponse(String recordId) {
String reqURI = System.getProperty("STORAGE_URL", System.getenv("STORAGE_URL")).replaceFirst("/*$", "")
String reqURI = System.getProperty("STORAGE_URL", System.getenv("STORAGE_URL")).replaceAll("/$", "")
+ AutomationConstants.GET_ENDPOINT + recordId;
HttpRequest httpRequest = HttpRequest.builder().url(reqURI).httpMethod(HttpRequest.GET)
.requestHeaders(this.context.getAuthHeaders()).build();
......
......@@ -57,7 +57,6 @@ public class StorageServiceImpl implements StorageService {
RestResponse response = restClient.processRequest(requestParameters);
log.info(response.getMessage());
return response.getMessage();
}
......@@ -90,7 +89,6 @@ public class StorageServiceImpl implements StorageService {
RestResponse response = restClient.processRequest(requestParameters);
verifyResponseStatus(response);
log.info(response.getMessage());
return response.getMessage();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment