Running samples only for meta release
This commit is contained in:
@@ -39,7 +39,8 @@ public class PostReleaseActions {
|
||||
* @param projects - set of project with versions to assert agains
|
||||
*/
|
||||
public void runUpdatedTests(Projects projects) {
|
||||
if (!this.properties.getGit().isRunUpdatedSamples()) {
|
||||
if (!this.properties.getGit().isRunUpdatedSamples() ||
|
||||
!this.properties.getMetaRelease().isEnabled()) {
|
||||
log.info("Will not update and run test samples, since the switch to do so "
|
||||
+ "is off. Set [releaser.git.run-updated-samples] to [true] to change that");
|
||||
return;
|
||||
|
||||
@@ -50,7 +50,18 @@ public class PostReleaseActionsTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_do_nothing_when_the_switch_is_off() {
|
||||
public void should_do_nothing_when_is_not_meta_release() {
|
||||
this.properties.getMetaRelease().setEnabled(false);
|
||||
PostReleaseActions actions = new PostReleaseActions(this.projectGitHandler,
|
||||
this.updater, this.builder, this.properties);
|
||||
|
||||
actions.runUpdatedTests(currentGa());
|
||||
|
||||
BDDAssertions.then(clonedTestSamples).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_do_nothing_when_the_switch_for_sample_check_is_off() {
|
||||
this.properties.getGit().setRunUpdatedSamples(false);
|
||||
PostReleaseActions actions = new PostReleaseActions(this.projectGitHandler,
|
||||
this.updater, this.builder, this.properties);
|
||||
@@ -62,6 +73,7 @@ public class PostReleaseActionsTests {
|
||||
|
||||
@Test
|
||||
public void should_update_project_and_run_tests() {
|
||||
this.properties.getMetaRelease().setEnabled(true);
|
||||
this.properties.getGit().setTestSamplesProjectUrl(tmpFile("spring-cloud-core-tests/").getAbsolutePath() + "/");
|
||||
this.properties.getMaven().setBuildCommand("touch build.log");
|
||||
PostReleaseActions actions = new PostReleaseActions(this.projectGitHandler,
|
||||
|
||||
Reference in New Issue
Block a user