1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-02-05 13:25:19 +02:00

fix(checkmarx):disable failOnMissingReports (#4713)

* fix(checkmarx):disable failOnMissingReports

* fix(checkmarx):disable failOnMissingReports

---------

Co-authored-by: sumeet patil <sumeet.patil@sap.com>
This commit is contained in:
thtri 2023-12-19 08:54:51 +01:00 committed by GitHub
parent 0b585ed932
commit 13a97c8aea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 19 deletions

View File

@ -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
)
}
}

View File

@ -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)
}

View File

@ -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)
}