use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class TestGetModules method testOtherPlUsing.
@Test
public void testOtherPlUsing() {
File pomFile = new File("src/test/resources/maven-multimodule-pl-example/basic_state/pom.xml");
ExecutionConfig config = new ExecutionConfig();
config.setPl("using-module");
ProjectModules modules = MavenPomUtil.getModules(pomFile, config);
Assert.assertEquals(4, modules.getModules().size());
}
use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class TestGetModules method testPeassItself.
@Test
public void testPeassItself() {
File pomFile = new File("../pom.xml");
ProjectModules modules = MavenPomUtil.getModules(pomFile, new ExecutionConfig());
Assert.assertEquals(3, modules.getModules().size());
}
use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class DependenciesOnlyStartversionIT method cleanDependencies.
@BeforeEach
public void cleanDependencies() throws Exception {
FileUtils.deleteDirectory(ContinuousDependencyReaderIT.resultsFolders.getStaticTestSelectionFile().getParentFile());
Assert.assertFalse(ContinuousDependencyReaderIT.resultsFolders.getStaticTestSelectionFile().exists());
FileUtils.deleteDirectory(TestConstants.CURRENT_FOLDER);
builder = new GitProjectBuilder(TestConstants.CURRENT_FOLDER, new File("../dependency/src/test/resources/dependencyIT/basic_state"));
VersionIteratorGit iterator = new VersionIteratorGit(TestConstants.CURRENT_FOLDER);
iterator.goToFirstCommit();
ExecutionConfig executionConfig = new ExecutionConfig();
executionConfig.setVersion(iterator.getTag());
executionConfig.setVersionOld(iterator.getPrevious().getTag());
ContinuousDependencyReader reader = new ContinuousDependencyReader(DependencyTestConstants.DEFAULT_CONFIG_NO_VIEWS, executionConfig, new KiekerConfig(true), new PeassFolders(TestConstants.CURRENT_FOLDER), ContinuousDependencyReaderIT.resultsFolders, new EnvironmentVariables());
dependencies = reader.getDependencies(iterator, "");
Assert.assertEquals(0, dependencies.getVersions().size());
}
use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class TestContinuousDependencyReader method testNoChangeHappened.
@Test
public void testNoChangeHappened() throws JsonGenerationException, JsonMappingException, IOException {
ResultsFolders resultsFolders = new ResultsFolders(new File("target/current_results"), "current");
StaticTestSelection value = new StaticTestSelection();
value.setInitialversion(new InitialVersion());
value.getVersions().put("A", new VersionStaticSelection());
Constants.OBJECTMAPPER.writeValue(resultsFolders.getStaticTestSelectionFile(), value);
ContinuousDependencyReader reader = new ContinuousDependencyReader(new TestSelectionConfig(1, false), new ExecutionConfig(), new KiekerConfig(), new PeassFolders(new File("target/current")), resultsFolders, new EnvironmentVariables());
reader.getDependencies(null, "git:dummyUrl");
}
use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class TestDependencyIteratorBuilder method testNightlyBuildIteratorCreation.
@Test
public void testNightlyBuildIteratorCreation() {
try (MockedStatic<GitUtils> gitUtil = Mockito.mockStatic(GitUtils.class)) {
gitUtil.when(() -> GitUtils.getName(Mockito.any(), Mockito.any())).thenReturn(VERSION_2);
ExecutionConfig config = new ExecutionConfig();
config.setVersionOld(null);
config.setVersion("HEAD");
StaticTestSelection dependencies = buildVersionDependencies(LAST_RUNNING_VERSION);
VersionIteratorGit iterator = new DependencyIteratorBuilder(config, dependencies, new PeassFolders(TEMPORARY_FOLDER)).getIterator();
Assert.assertEquals(2, iterator.getSize());
Assert.assertEquals(VERSION_2, iterator.getTag());
Assert.assertEquals(LAST_RUNNING_VERSION, iterator.getPredecessor());
}
}
Aggregations