mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-03-05 15:15:44 +02:00
Adapt test
This commit is contained in:
parent
6066585072
commit
bffb57137a
@ -113,7 +113,7 @@ class WhitesourceExecuteScanTest extends BasePiperTest {
|
||||
helper.registerAllowedMethod("fetchProjectsMetaInfo", [], {
|
||||
return new JsonUtils().parseJsonSerializable("{ \"projectVitals\": [{ \"id\": 261964, \"name\": \"piper-demo - 0.0.1\", \"token\": \"a2a62e5d7beb4170ad4dccfa3316b5a4cd3fadefc56c49f88fbf9400a09f7d94\", \"creationDate\": \"2017-09-21 00:28:06 +0000\", \"lastUpdatedDate\": \"2017-10-12 01:03:05 +0000\" }]}").projectVitals
|
||||
})
|
||||
helper.registerAllowedMethod("fetchReportForProduct", [], { })
|
||||
helper.registerAllowedMethod("fetchReportForProduct", [String], { })
|
||||
helper.registerAllowedMethod( "fetchProjectLicenseAlerts", [Object.class], {
|
||||
return new JsonUtils().parseJsonSerializable("{ \"alerts\": [] }").alerts
|
||||
})
|
||||
|
@ -203,14 +203,14 @@ private def triggerWhitesourceScanWithUserKey(script, config, utils, descriptorU
|
||||
}
|
||||
|
||||
if (config.reporting) {
|
||||
analyseWhitesourceResults(utils, config, repository, orgAdminRepository)
|
||||
analyseWhitesourceResults(config, repository, orgAdminRepository)
|
||||
}
|
||||
|
||||
return statusCode
|
||||
}
|
||||
}
|
||||
|
||||
void analyseWhitesourceResults(Utils utils, Map config, WhitesourceRepository repository, WhitesourceOrgAdminRepository orgAdminRepository) {
|
||||
void analyseWhitesourceResults(Map config, WhitesourceRepository repository, WhitesourceOrgAdminRepository orgAdminRepository) {
|
||||
if (!config.productToken) {
|
||||
def metaInfo = orgAdminRepository.fetchProductMetaInfo()
|
||||
echo "Meta Information: $metaInfo"
|
||||
|
Loading…
x
Reference in New Issue
Block a user