Added tests

This commit is contained in:
Marcin Grzejszczak
2018-10-23 15:31:27 +02:00
parent f9f8282539
commit 96bd2c9efe
2 changed files with 12 additions and 0 deletions

View File

@@ -279,6 +279,7 @@ The following properties are used for both meta release and a release of an indi
- `releaser.git.spring-project-branch` - Branch to check out for the documentation project. Defaults to `gh-pages`.
- `releaser.git.test-samples-project-url` - URL to the test samples to be checked against the given release train. Defaults to `https://github.com/spring-cloud/spring-cloud-core-tests`.
- `releaser.git.test-samples-project-branch` - Branch to check out for test samples. Defaults to `master`.
- `releaser.git.run-updated-samples` - If `true` then will update samples and run the the build. Defaults to `true`.
- `releaser.git.update-documentation-repo` - If `true` then will update documentation repository with the `current` URL. Defaults to `true`.
- `releaser.git.update-spring-guides` - If `true` then will update Spring Guides with the current release train. Defaults to `true`.
- `releaser.git.update-spring-project` - If `true` then will update Spring Project page with the current release train values. Defaults to `true`.

View File

@@ -49,6 +49,17 @@ public class PostReleaseActionsTests {
FileSystemUtils.copyRecursively(file("/projects/"), this.temporaryFolder);
}
@Test
public void should_do_nothing_when_the_switch_is_off() {
this.properties.getGit().setRunUpdatedSamples(false);
PostReleaseActions actions = new PostReleaseActions(this.projectGitHandler,
this.updater, this.builder, this.properties);
actions.runUpdatedTests(currentGa());
BDDAssertions.then(clonedTestSamples).isNull();
}
@Test
public void should_update_project_and_run_tests() {
this.properties.getGit().setTestSamplesProjectUrl(tmpFile("spring-cloud-core-tests/").getAbsolutePath() + "/");