Skip to content

Commit

Permalink
Исправлен мерж примитивов в конфигурациях
Browse files Browse the repository at this point in the history
  • Loading branch information
nixel2007 committed Dec 8, 2021
1 parent 54a070f commit c567cca
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class InitInfoBaseOptions implements Serializable {
InitInfoBaseMethod initMethod = InitInfoBaseMethod.FROM_STORAGE;

@JsonPropertyDescription("Запустить миграцию ИБ")
boolean runMigration = true
Boolean runMigration = true

@JsonPropertyDescription("""Дополнительные шаги, запускаемые через vrunner.
В каждой строке передается отдельная команда
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import com.fasterxml.jackson.annotation.JsonPropertyDescription
class ResultsTransformOptions implements Serializable {

@JsonPropertyDescription("Фильтровать замечания по уровню поддержки модуля. По умолчанию включено.")
boolean removeSupport = true
Boolean removeSupport = true

@JsonPropertyDescription("""Настройка фильтрации замечаний по уровню поддержки.
0 - удалить файлы на замке;
1 - удалить файлы на замке и на поддержке;
2 - удалить файлы на замке, на поддержке и снятые с поддержки.
""")
int supportLevel
Integer supportLevel

@Override
@NonCPS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class SonarQubeOptions implements Serializable {
String sonarQubeInstallation;

@JsonPropertyDescription("Использовать sonar-scanner, доступный в PATH")
boolean useSonarScannerFromPath
Boolean useSonarScannerFromPath

@JsonPropertyDescription(
"Имя настроенной утилиты sonar-scanner.\nПрименяется, если useSonarScannerFromPath установлено в false."
Expand Down
12 changes: 6 additions & 6 deletions src/ru/pulsar/jenkins/library/configuration/StageFlags.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ import com.fasterxml.jackson.annotation.JsonPropertyDescription
@JsonIgnoreProperties(ignoreUnknown = true)
class StageFlags implements Serializable {
@JsonPropertyDescription("Анализ SonarQube включен")
boolean sonarqube
Boolean sonarqube

@JsonPropertyDescription("Синтаксический контроль включен")
boolean syntaxCheck
Boolean syntaxCheck

@JsonPropertyDescription("Валидация EDT включена")
boolean edtValidate
Boolean edtValidate

@JsonPropertyDescription("Дымовые тесты включены")
boolean smoke
Boolean smoke

@JsonPropertyDescription("Предварительные шаги инициализации включены")
boolean initSteps
Boolean initSteps

@JsonPropertyDescription("Запуск BDD сценариев включен")
boolean bdd
Boolean bdd

@Override
@NonCPS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ void testCreateJobConfigurationObject() throws IOException {
assertThat(jobConfiguration.getV8version()).isEqualTo("8.3.14.1944");

assertThat(jobConfiguration.getSonarQubeOptions().getSonarScannerToolName()).isEqualTo("sonar-scanner");
assertThat(jobConfiguration.getSonarQubeOptions().getSonarQubeInstallation()).isEqualTo("qa");
assertThat(jobConfiguration.getSonarQubeOptions().getUseSonarScannerFromPath()).isTrue();

assertThat(jobConfiguration.getSecrets())
.hasFieldOrPropertyWithValue("storage", "1234")
Expand All @@ -41,7 +43,7 @@ void testCreateJobConfigurationObject() throws IOException {

assertThat(jobConfiguration.getSyntaxCheckOptions().getCheckModes()).hasSize(1);

assertThat(jobConfiguration.getResultsTransformOptions().isRemoveSupport()).isFalse();
assertThat(jobConfiguration.getResultsTransformOptions().getRemoveSupport()).isFalse();
assertThat(jobConfiguration.getResultsTransformOptions().getSupportLevel()).isZero();

assertThat(jobConfiguration.getSmokeTestOptions().getVrunnerSettings()).contains("./tools/vrunner-smoke.json");
Expand Down
3 changes: 3 additions & 0 deletions test/unit/resources/jobConfiguration.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"vanessa --settings ./tools/vrunner.first.json"
]
},
"sonarqube": {
"sonarQubeInstallation": "qa"
},
"syntaxCheck": {
"checkModes": ["-ThinClient"]
},
Expand Down

0 comments on commit c567cca

Please sign in to comment.