Search in sources :

Example 1 with RepoProperties

use of com.checkmarx.flow.config.RepoProperties in project cx-flow by checkmarx-ltd.

the class ScaThresholdsSteps method pull_request_should_fail.

@Then("pull request should {word}")
public void pull_request_should_fail(String expected) {
    RepoProperties repoProperties = new RepoProperties();
    repoProperties.setErrorMerge(true);
    ScanResults scanResults = new ScanResults();
    scanResults.setScaResults(scaResults);
    PullRequestReport pullRequestReport = new PullRequestReport();
    boolean actual = thresholdValidatorImpl.isMergeAllowed(scanResults, repoProperties, pullRequestReport);
    log.info("is merged allowed = {} (expecting: {})", actual, expected);
    assertEquals(expected.equals("pass"), actual, "is merged allowed = " + actual + ", but was expecting: " + expected);
}
Also used : PullRequestReport(com.checkmarx.flow.dto.report.PullRequestReport) ScanResults(com.checkmarx.sdk.dto.ScanResults) RepoProperties(com.checkmarx.flow.config.RepoProperties) Then(io.cucumber.java.en.Then)

Aggregations

RepoProperties (com.checkmarx.flow.config.RepoProperties)1 PullRequestReport (com.checkmarx.flow.dto.report.PullRequestReport)1 ScanResults (com.checkmarx.sdk.dto.ScanResults)1 Then (io.cucumber.java.en.Then)1