mirror of
https://github.com/firstBitMarksistskaya/jenkins-lib.git
synced 2025-01-21 12:03:28 +02:00
Отказ от генератора toString
При добавлении генератора в Secrets ломается вывод JobConfiguration
This commit is contained in:
parent
aae6f782b6
commit
6d34a97591
@ -2,8 +2,6 @@ package ru.pulsar.jenkins.library.configuration
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyDescription
|
||||
import org.apache.commons.lang3.builder.ReflectionToStringBuilder
|
||||
import org.apache.commons.lang3.builder.ToStringStyle
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
class JobConfiguration implements Serializable {
|
||||
@ -18,6 +16,10 @@ class JobConfiguration implements Serializable {
|
||||
|
||||
@Override
|
||||
String toString() {
|
||||
return ReflectionToStringBuilder.toString(this, ToStringStyle.JSON_STYLE)
|
||||
return "JobConfiguration{" +
|
||||
"v8version='" + v8version + '\'' +
|
||||
", sonarScannerToolName='" + sonarScannerToolName + '\'' +
|
||||
", secrets=" + secrets.toString() +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -12,4 +12,12 @@ class Secrets implements Serializable {
|
||||
@JsonPropertyDescription("Данные авторизации в хранилище конфигурации")
|
||||
String storage
|
||||
|
||||
|
||||
@Override
|
||||
String toString() {
|
||||
return "Secrets{" +
|
||||
"storagePath='" + storagePath + '\'' +
|
||||
", storage='" + storage + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ class jobConfigurationTest {
|
||||
workflowJob.definition = flow
|
||||
|
||||
def run = rule.buildAndAssertSuccess(workflowJob)
|
||||
rule.assertLogContains('"v8version":"8.3.12.1500"', run)
|
||||
rule.assertLogContains('"sonarScannerToolName":"sonar-scanner"', run)
|
||||
rule.assertLogContains("v8version='8.3.12.1500'", run)
|
||||
rule.assertLogContains("sonarScannerToolName='sonar-scanner'", run)
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user