Skip to content

Commit

Permalink
fix(checkmarx):disable failOnMissingReports (#4713)
Browse files Browse the repository at this point in the history
* fix(checkmarx):disable failOnMissingReports

* fix(checkmarx):disable failOnMissingReports

---------

Co-authored-by: sumeet patil <[email protected]>
  • Loading branch information
thtri and sumeetpatil authored Dec 19, 2023
1 parent 0b585ed commit 13a97c8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
17 changes: 0 additions & 17 deletions test/groovy/CheckmarxExecuteScanTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,4 @@ class CheckmarxExecuteScanTest extends BasePiperTest {
assertThat(withEnvArgs[0], allOf(startsWith('PIPER_parametersJSON'), containsString('"testParam":"This is test content"')))
assertThat(shellCallRule.shell[2], is('./piper checkmarxExecuteScan'))
}

@Test
void testCheckmarxExecuteScanNoReports() {
helper.registerAllowedMethod('fileExists', [Map], {
return false
})

exception.expect(AbortException)
exception.expectMessage("Expected to find checkmarxExecuteScan_reports.json in workspace but it is not there")

stepRule.step.checkmarxExecuteScan(
juStabUtils: utils,
jenkinsUtilsStub: jenkinsUtils,
testParam: "This is test content",
script: nullScript
)
}
}
2 changes: 1 addition & 1 deletion vars/checkmarxExecuteScan.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import groovy.transform.Field

void call(Map parameters = [:]) {
List credentials = [[type: 'usernamePassword', id: 'checkmarxCredentialsId', env: ['PIPER_username', 'PIPER_password']], [type: 'token', id: 'githubTokenCredentialsId', env: ['PIPER_githubToken']]]
piperExecuteBin(parameters, STEP_NAME, METADATA_FILE, credentials, true)
piperExecuteBin(parameters, STEP_NAME, METADATA_FILE, credentials)
}
2 changes: 1 addition & 1 deletion vars/checkmarxOneExecuteScan.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import groovy.transform.Field
void call(Map parameters = [:]) {
List credentials = [[type: 'usernamePassword', id: 'checkmarxOneCredentialsId', env: ['PIPER_clientId', 'PIPER_clientSecret']],
[type: 'token', id: 'checkmarxOneAPIKey', env: ['PIPER_APIKey']]]
piperExecuteBin(parameters, STEP_NAME, METADATA_FILE, credentials, true)
piperExecuteBin(parameters, STEP_NAME, METADATA_FILE, credentials)
}

0 comments on commit 13a97c8

Please sign in to comment.