use of com.checkmarx.flow.CxFlowRunner in project cx-flow by checkmarx-ltd.
the class BatchComponentSteps method sastClientIsMocked.
@Given("SAST client is mocked - to allow tests to pass without active SAST environment")
public void sastClientIsMocked() throws CheckmarxException {
when(cxClient.getTeamId(anyString())).thenReturn(ScanFixture.TEAM_ID);
when(cxClient.getProjects(anyString())).thenReturn(ScanFixture.getProjects());
FilterConfiguration filter = FilterConfiguration.fromSimpleFilters(ScanFixture.getScanFilters());
when(cxClient.getReportContentByScanId(ScanFixture.SCAN_ID, filter)).thenReturn(ScanFixture.getScanResults());
CxScannerService cxScannerService = new CxScannerService(cxProperties, null, null, null, null);
cxFlowRunner = new CxFlowRunner(flowProperties, cxScannerService, jiraProperties, gitHubProperties, gitLabProperties, iastService, adoProperties, helperService, executors, resultsService, osaScannerService, filterFactory, configOverrider, buildProperties, scanners, thresholdValidator);
}
use of com.checkmarx.flow.CxFlowRunner in project cx-flow by checkmarx-ltd.
the class IastCliSteps method mockCliRunner.
@Given("mock CLI runner {} {} {}")
public void mockCliRunner(String scanTag, String bugTracker, String params) {
scanTag = removeQuotes(scanTag);
bugTracker = removeQuotes(bugTracker);
params = removeQuotes(params);
cxFlowRunner = new CxFlowRunner(flowProperties, cxScannerService, jiraProperties, gitHubProperties, gitLabProperties, iastService, adoProperties, helperService, executors, resultsService, osaScannerService, filterFactory, configOverrider, buildProperties, scanners, thresholdValidator);
String arguments = ARGS + " --scan-tag=" + scanTag + " --bug-tracker=" + bugTracker + " " + params;
String[] argsParam = arguments.split(" ");
this.args = new DefaultApplicationArguments(argsParam);
}
Aggregations