mirror of
https://github.com/firstBitMarksistskaya/jenkins-lib.git
synced 2024-12-04 10:34:42 +02:00
Доработаны юнит-тесты методов JobConfiguration
This commit is contained in:
parent
fade785003
commit
8c5b53a7a8
@ -2,6 +2,7 @@ package ru.pulsar.jenkins.library.configuration;
|
||||
|
||||
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.utils.TestUtils;
|
||||
|
||||
@ -62,4 +63,52 @@ class ConfigurationReaderTest {
|
||||
assertThat(jobConfiguration.getTimeoutOptions().getZipInfoBase()).isEqualTo(123);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testV8versionMethod() throws IOException {
|
||||
// given
|
||||
String config = IOUtils.resourceToString(
|
||||
"jobConfiguration.json",
|
||||
StandardCharsets.UTF_8,
|
||||
this.getClass().getClassLoader()
|
||||
);
|
||||
|
||||
// when
|
||||
JobConfiguration jobConfiguration = ConfigurationReader.create(config);
|
||||
|
||||
// then
|
||||
assertThat(jobConfiguration.v8version()).isEqualTo("8.3.14.1944");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testEdtVersionForRingMethod() throws IOException {
|
||||
// given
|
||||
String config = IOUtils.resourceToString(
|
||||
"jobConfiguration.json",
|
||||
StandardCharsets.UTF_8,
|
||||
this.getClass().getClassLoader()
|
||||
);
|
||||
|
||||
// when
|
||||
JobConfiguration jobConfiguration = ConfigurationReader.create(config);
|
||||
|
||||
// then
|
||||
assertThat(jobConfiguration.edtVersionForRing()).isEqualTo("edt@2021.3.4:x86_64");
|
||||
}
|
||||
|
||||
@Disabled
|
||||
void testinfoBaseFromFilesMethod() throws IOException {
|
||||
// given
|
||||
String config = IOUtils.resourceToString(
|
||||
"jobConfiguration.json",
|
||||
StandardCharsets.UTF_8,
|
||||
this.getClass().getClassLoader()
|
||||
);
|
||||
|
||||
// when
|
||||
JobConfiguration jobConfiguration = ConfigurationReader.create(config);
|
||||
|
||||
// then
|
||||
assertThat(jobConfiguration.infoBaseFromFiles()).isFalse();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user