Skip to content

Commit 598f380

Browse files
committed
intg 1575 refactoring
1 parent 943c3ab commit 598f380

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

src/main/java/com/browserstack/automate/ci/common/constants/Constants.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ public class Constants {
2020

2121
public static final String REPORT_CONFIG_OPERATION_NAME = "report-config";
2222

23-
public static final String REPORT_COMPLETED_STATUS = "COMPLETED";
24-
public static final String REPORT_IN_PROGRESS_STATUS = "IN_PROGRESS";
25-
23+
public static enum REPORT_STATUS {
24+
IN_PROGRESS,
25+
COMPLETED,
26+
FAILED
27+
}
2628
// Product
2729
public static final String AUTOMATE = "automate";
2830
public static final String APP_AUTOMATE = "app-automate";

src/main/java/com/browserstack/automate/ci/jenkins/integrationService/BrowserStackTestReportAction.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
package com.browserstack.automate.ci.jenkins;
1+
package com.browserstack.automate.ci.jenkins.integrationService;
22

33
import com.browserstack.automate.ci.common.constants.Constants;
4+
import com.browserstack.automate.ci.jenkins.BrowserStackCredentials;
45
import hudson.model.Action;
56
import hudson.model.Run;
67
import org.json.JSONObject;
@@ -71,9 +72,9 @@ private void fetchReport() {
7172
params.put("tool", Constants.INTEGRATIONS_TOOL_KEY);
7273

7374
try {
74-
String CIReportUrlWithParams = requestsUtil.buildQueryParams(reportUrl, params);
75+
String ciReportUrlWithParams = requestsUtil.buildQueryParams(reportUrl, params);
7576
log(logger, "Fetching browserstack report " + reportName);
76-
Response response = requestsUtil.makeRequest(CIReportUrlWithParams, credentials);
77+
Response response = requestsUtil.makeRequest(ciReportUrlWithParams, credentials);
7778
if (response.isSuccessful()) {
7879
JSONObject reportResponse = new JSONObject(response.body().string());
7980
String reportStatus = reportResponse.optString("report_status");

src/main/java/com/browserstack/automate/ci/jenkins/integrationService/BrowserStackTestReportPublisher.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
package com.browserstack.automate.ci.jenkins;
1+
package com.browserstack.automate.ci.jenkins.integrationService;
22

33
import com.browserstack.automate.ci.common.BrowserStackEnvVars;
44
import com.browserstack.automate.ci.common.constants.Constants;
5+
import com.browserstack.automate.ci.jenkins.BrowserStackBuildAction;
6+
import com.browserstack.automate.ci.jenkins.BrowserStackCredentials;
57
import edu.umd.cs.findbugs.annotations.NonNull;
68
import hudson.EnvVars;
79
import hudson.Extension;

src/main/java/com/browserstack/automate/ci/jenkins/integrationService/RequestsUtil.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
package com.browserstack.automate.ci.jenkins;
1+
package com.browserstack.automate.ci.jenkins.integrationService;
22

3+
import com.browserstack.automate.ci.jenkins.BrowserStackCredentials;
34
import okhttp3.Credentials;
45
import okhttp3.OkHttpClient;
56
import okhttp3.Request;

0 commit comments

Comments
 (0)