diff --git a/test/unit/groovy/ru/pulsar/jenkins/library/configuration/ConfigurationReaderTest.java b/test/unit/groovy/ru/pulsar/jenkins/library/configuration/ConfigurationReaderTest.java index 6886e7a0..07e5c37a 100644 --- a/test/unit/groovy/ru/pulsar/jenkins/library/configuration/ConfigurationReaderTest.java +++ b/test/unit/groovy/ru/pulsar/jenkins/library/configuration/ConfigurationReaderTest.java @@ -60,7 +60,10 @@ void testCreateJobConfigurationObject() throws IOException { assertThat(jobConfiguration.getSmokeTestOptions().getVrunnerSettings()).contains("./tools/vrunner-smoke.json"); assertThat(jobConfiguration.getSmokeTestOptions().isPublishToAllureReport()).isFalse(); assertThat(jobConfiguration.getSmokeTestOptions().isPublishToJUnitReport()).isTrue(); - assertThat(jobConfiguration.getSmokeTestOptions().getCoverage()).isFalse(); + assertThat(jobConfiguration.getSmokeTestOptions().getCoverage()).isTrue(); + assertThat(jobConfiguration.getSmokeTestOptions().getDbgsPort()).isEqualTo(1555); + + assertThat(jobConfiguration.getYaxunitOptions().getDbgsPort()).isEqualTo(1550); assertThat(jobConfiguration.getInitInfoBaseOptions().getRunMigration()).isFalse(); assertThat(jobConfiguration.getInitInfoBaseOptions().getAdditionalInitializationSteps()).contains("vanessa --settings ./tools/vrunner.first.json"); @@ -118,7 +121,7 @@ void testEdtAgentLabel() throws IOException { assertThat(jobConfiguration.edtAgentLabel()).isEqualTo("edt@2021.3.4:x86_64"); } - @Disabled + @Test void testInfoBaseFromFiles() throws IOException { // given String config = IOUtils.resourceToString( diff --git a/test/unit/groovy/ru/pulsar/jenkins/library/utils/EnvUtils.java b/test/unit/groovy/ru/pulsar/jenkins/library/utils/EnvUtils.java index d621c3e6..629c6561 100644 --- a/test/unit/groovy/ru/pulsar/jenkins/library/utils/EnvUtils.java +++ b/test/unit/groovy/ru/pulsar/jenkins/library/utils/EnvUtils.java @@ -9,6 +9,7 @@ public class EnvUtils implements EnvironmentAction { public String NODE_NAME = "node"; public String WORKSPACE = "ws"; + public String BRANCH_NAME = "master"; @Override public EnvVars getEnvironment() throws IOException, InterruptedException { diff --git a/test/unit/resources/jobConfiguration.json b/test/unit/resources/jobConfiguration.json index c7682c79..48dfb6fd 100644 --- a/test/unit/resources/jobConfiguration.json +++ b/test/unit/resources/jobConfiguration.json @@ -1,91 +1,99 @@ -{ - "v8version": "8.3.14.1944", - "edtVersion": "2021.3.4:x86_64", - "secrets": { - "storage": "1234" - }, - "coverage": { - "dbgsPath": "/opt/1cv8/current/dbgs" - }, - "stages": { - "syntaxCheck": true - }, - "timeout": { - "zipInfoBase": 123 - }, - "initInfobase": { - "runMigration": false, - "additionalInitializationSteps": [ - "vanessa --settings ./tools/vrunner.first.json" - ], - "extensions": [ - { - "name": "YAXUnit", - "initMethod": "fromSource", - "path": "./src/cfe/YAXUnit", - "stages": ["yaxunit"] - }, - { - "name": "BDD", - "initMethod": "fromSource", - "path": "./src/cfe/bdd", - "stages": ["bdd"] - }, - { - "name": "mods", - "initMethod": "fromSource", - "path": "./src/cfe/mods" - }, - { - "name": "mods2", - "initMethod": "fromSource", - "path": "./src/cfe/mods2", - "stages": ["initInfoBase"] - } - ] - }, - "sonarqube": { - "sonarQubeInstallation": "qa", - "branchAnalysisConfiguration": "auto" - }, - "syntaxCheck": { - "checkModes": [ - "-ThickClient", - "-ThinClient", - "-WebClient", - "-Server" - ] - }, - "resultsTransform": { - "transformer": "stebi", - "genericIssueFormat": "Generic_Issue", - "removeSupport": false - }, - "smoke": { - "vrunnerSettings": "./tools/vrunner-smoke.json", - "publishToAllureReport": false, - "publishToJUnitReport": true - }, - "notifications": { - "email": { - "onAlways": true, - "alwaysOptions": { - "attachLog": true, - "directRecipients": [ - "1@1.com", - "2@1.com" - ] - }, - "failureOptions": { - "recipientProviders": [ - "developers" - ] - } - }, - "telegram": { - "onAlways": false, - "onFailure": true - } - }, - "logosConfig": "logger.rootLogger=DEBUG" +{ + "v8version": "8.3.14.1944", + "edtVersion": "2021.3.4:x86_64", + "secrets": { + "storage": "1234" + }, + "coverage": { + "dbgsPath": "/opt/1cv8/current/dbgs" + }, + "stages": { + "syntaxCheck": true + }, + "timeout": { + "zipInfoBase": 123 + }, + "initInfobase": { + "runMigration": false, + "additionalInitializationSteps": [ + "vanessa --settings ./tools/vrunner.first.json" + ], + "extensions": [ + { + "name": "YAXUnit", + "initMethod": "fromSource", + "path": "./src/cfe/YAXUnit", + "stages": [ + "yaxunit" + ] + }, + { + "name": "BDD", + "initMethod": "fromSource", + "path": "./src/cfe/bdd", + "stages": [ + "bdd" + ] + }, + { + "name": "mods", + "initMethod": "fromSource", + "path": "./src/cfe/mods" + }, + { + "name": "mods2", + "initMethod": "fromSource", + "path": "./src/cfe/mods2", + "stages": [ + "initInfoBase" + ] + } + ] + }, + "sonarqube": { + "sonarQubeInstallation": "qa", + "branchAnalysisConfiguration": "auto" + }, + "syntaxCheck": { + "checkModes": [ + "-ThickClient", + "-ThinClient", + "-WebClient", + "-Server" + ] + }, + "resultsTransform": { + "transformer": "stebi", + "genericIssueFormat": "Generic_Issue", + "removeSupport": false + }, + "smoke": { + "vrunnerSettings": "./tools/vrunner-smoke.json", + "publishToAllureReport": false, + "publishToJUnitReport": true, + "coverage": true, + "dbgsPort": 1555 + }, + "notifications": { + "email": { + "onAlways": true, + "alwaysOptions": { + "attachLog": true, + "directRecipients": [ + "1@1.com", + "2@1.com" + ] + }, + "failureOptions": { + "recipientProviders": [ + "developers" + ] + } + }, + "telegram": { + "onAlways": false, + "onFailure": true + } + }, + "logosConfig": "logger.rootLogger=DEBUG" } \ No newline at end of file