forked from firstBitMarksistskaya/jenkins-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
подключение расширений на разных шагах
исправление замечаний
- Loading branch information
1 parent
13ce9cf
commit 9f0a922
Showing
11 changed files
with
182 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
test/unit/groovy/ru/pulsar/jenkins/library/steps/LoadExtensionsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package ru.pulsar.jenkins.library.steps; | ||
|
||
import org.apache.commons.io.IOUtils; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import ru.pulsar.jenkins.library.IStepExecutor; | ||
import ru.pulsar.jenkins.library.configuration.ConfigurationReader; | ||
import ru.pulsar.jenkins.library.configuration.JobConfiguration; | ||
import ru.pulsar.jenkins.library.utils.TestUtils; | ||
|
||
import java.io.IOException; | ||
import java.nio.charset.StandardCharsets; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
|
||
class LoadExtensionsTest { | ||
|
||
@BeforeEach | ||
void setUp() { | ||
TestUtils.setupMockedContext(); | ||
} | ||
|
||
@Test | ||
void runYaxunit() throws IOException { | ||
|
||
// given | ||
String config = IOUtils.resourceToString( | ||
"jobConfiguration.json", | ||
StandardCharsets.UTF_8, | ||
this.getClass().getClassLoader() | ||
); | ||
|
||
// when | ||
JobConfiguration jobConfiguration = ConfigurationReader.create(config); | ||
|
||
LoadExtensions loadExtensions = new LoadExtensions(jobConfiguration, "yaxunit"); | ||
|
||
// when | ||
Object run = loadExtensions.run(); | ||
|
||
// assertThat(log.toString).(1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters