Skip to content

Commit

Permalink
fix merge configuration, add test
Browse files Browse the repository at this point in the history
  • Loading branch information
ovcharenko-di committed Jan 18, 2025
1 parent b92c12e commit 35110ea
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class ConfigurationReader implements Serializable {
"yaxunitOptions",
"syntaxCheckOptions",
"resultsTransformOptions",
"archiveInfobase",
"notificationsOptions",
"emailNotificationOptions",
"alwaysEmailOptions",
Expand All @@ -83,6 +84,7 @@ class ConfigurationReader implements Serializable {
mergeInitInfoBaseOptions(baseConfiguration.initInfoBaseOptions, configurationToMerge.initInfoBaseOptions)
mergeBddOptions(baseConfiguration.bddOptions, configurationToMerge.bddOptions)
mergeSyntaxCheckOptions(baseConfiguration.syntaxCheckOptions, configurationToMerge.syntaxCheckOptions)
// mergeArchiveInfobaseOptions(baseConfiguration.archiveInfobaseOptions, configurationToMerge.archiveInfobaseOptions)
mergeNotificationsOptions(baseConfiguration.notificationsOptions, configurationToMerge.notificationsOptions)

return baseConfiguration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.apache.commons.io.IOUtils;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import ru.pulsar.jenkins.library.configuration.sonarqube.GenericIssueFormat;
import ru.pulsar.jenkins.library.utils.TestUtils;
Expand Down Expand Up @@ -66,6 +65,7 @@ void testCreateJobConfigurationObject() throws IOException {
assertThat(jobConfiguration.getYaxunitOptions().getDbgsPort()).isEqualTo(1550);

assertThat(jobConfiguration.getInitInfoBaseOptions().getRunMigration()).isFalse();
assertThat(jobConfiguration.getInitInfoBaseOptions().getArchiveInfobase().getOnAlways()).isTrue();
assertThat(jobConfiguration.getInitInfoBaseOptions().getAdditionalInitializationSteps()).contains("vanessa --settings ./tools/vrunner.first.json");

assertThat(jobConfiguration.getBddOptions().getVrunnerSteps()).contains("vanessa --settings ./tools/vrunner.json");
Expand Down
5 changes: 4 additions & 1 deletion test/unit/resources/jobConfiguration.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@
"initInfoBase"
]
}
]
],
"archiveInfobase": {
"onAlways": true
}
},
"sonarqube": {
"sonarQubeInstallation": "qa",
Expand Down

0 comments on commit 35110ea

Please sign in to comment.