Table done; fixes gh-111

This commit is contained in:
Marcin Grzejszczak
2018-11-19 18:38:43 +01:00
parent 4ab19000ab
commit 03666265f8
29 changed files with 333 additions and 147 deletions

View File

@@ -346,7 +346,7 @@ class PropertyVersionChanger extends AbstractVersionChanger {
this.propertyStorer = propertyStorer;
}
@Override public void apply(final VersionChange versionChange) throws XMLStreamException {
@Override public void apply(final VersionChange versionChange) {
this.versions.projects
.stream()
.filter(project -> {

View File

@@ -2,7 +2,6 @@ package org.springframework.cloud.release.internal.post;
import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
@@ -84,7 +83,7 @@ public class PostReleaseActions implements Closeable {
+ "is off. Set [releaser.git.update-all-test-samples] to [true] to change that");
return;
}
List<ProjectAndException> projectAndExceptions = this.properties.getGit()
List<ProjectUrlAndException> projectUrlAndExceptions = this.properties.getGit()
.getAllTestSampleUrls()
.entrySet()
.stream()
@@ -93,22 +92,21 @@ public class PostReleaseActions implements Closeable {
.flatMap(Collection::stream)
.collect(Collectors.toList());
log.info("Updated all samples!");
List<String> exceptionMessages = projectAndExceptions.stream()
.filter(ProjectAndException::hasException)
List<String> exceptionMessages = projectUrlAndExceptions.stream()
.filter(ProjectUrlAndException::hasException)
.map(e -> "Project [" + e.key + "] for url [" + e.url + "] "
+ "has exception [" + Arrays
.toString(NestedExceptionUtils.getMostSpecificCause(e.ex)
.getStackTrace()) + "]")
.collect(Collectors.toList());
if (!exceptionMessages.isEmpty()) {
log.warn("Exceptions were found while updating samples");
log.warn(String.join("\n", exceptionMessages));
throw new IllegalStateException("Exceptions were found while updating samples\n" + String.join("\n", exceptionMessages));
} else {
log.info("No exceptions were found while updating the samples");
}
}
private Future<List<ProjectAndException>> updateAllProjects(Projects projects, Map.Entry<String, List<String>> e) {
private Future<List<ProjectUrlAndException>> updateAllProjects(Projects projects, Map.Entry<String, List<String>> e) {
return SERVICE.submit(() -> {
String key = e.getKey();
List<String> value = e.getValue();
@@ -162,7 +160,7 @@ public class PostReleaseActions implements Closeable {
return new ProjectAndFuture(key, url, SERVICE.submit(runnable));
}
private ProjectAndException getResult(ProjectAndFuture projectAndFuture) {
private ProjectUrlAndException getResult(ProjectAndFuture projectAndFuture) {
Exception e = null;
try {
projectAndFuture.future.get(10, TimeUnit.MINUTES);
@@ -171,10 +169,10 @@ public class PostReleaseActions implements Closeable {
catch (Exception ex) {
e = ex;
}
return new ProjectAndException(projectAndFuture.key, projectAndFuture.url, e);
return new ProjectUrlAndException(projectAndFuture.key, projectAndFuture.url, e);
}
private List<ProjectAndException> getResult(Future<List<ProjectAndException>> future) {
private List<ProjectUrlAndException> getResult(Future<List<ProjectUrlAndException>> future) {
try {
return future.get(10, TimeUnit.MINUTES);
}
@@ -211,7 +209,7 @@ public class PostReleaseActions implements Closeable {
}
@Override
public void close() throws IOException {
public void close() {
SERVICE.shutdown();
}
}
@@ -229,12 +227,12 @@ class ProjectAndFuture {
}
}
class ProjectAndException {
class ProjectUrlAndException {
final String key;
final String url;
final Exception ex;
ProjectAndException(String key, String url, Exception ex) {
ProjectUrlAndException(String key, String url, Exception ex) {
this.key = key;
this.url = url;
this.ex = ex;

View File

@@ -66,8 +66,7 @@ class BlogTemplateGenerator {
return this.blogOutput;
}
catch (Exception e) {
log.warn("Exception occurred while trying to create a blog entry", e);
return null;
throw new IllegalStateException("Exception occurred while trying to create a blog entry", e);
}
}

View File

@@ -32,8 +32,7 @@ class EmailTemplateGenerator {
return this.emailOutput;
}
catch (Exception e) {
log.warn("Exception occurred while trying to generate an email template", e);
return null;
throw new IllegalStateException("Exception occurred while trying to generate an email template", e);
}
}
}

View File

@@ -52,6 +52,7 @@ class Notes {
return this.version;
}
@SuppressWarnings("unused")
public String getClosedMilestoneUrl() {
return this.closedMilestoneUrl;
}

View File

@@ -49,22 +49,7 @@ class ReleaseNotesTemplateGenerator {
return this.blogOutput;
}
catch (IOException e) {
log.warn("Exception occurred while trying to generate release notes", e);
return null;
}
}
private int fileSize(File cached) {
try {
int length = Files.readAllBytes(cached.toPath()).length;
if (length == 0) {
log.warn("Cached file has no contents!");
}
return length;
}
catch (IOException e) {
log.warn("Exception [" + e + "] occurred while trying to retrieve file length - will assume it's empty");
return 0;
throw new IllegalStateException("Exception occurred while trying to generate release notes", e);
}
}
}

View File

@@ -31,8 +31,7 @@ class TwitterTemplateGenerator {
return this.output;
}
catch (Exception e) {
log.warn("Exception occurred while trying to generate a twitter template", e);
return null;
throw new IllegalStateException("Exception occurred while trying to generate a twitter template", e);
}
}
}

View File

@@ -14,7 +14,7 @@ import static org.assertj.core.api.BDDAssertions.then;
*/
public class ReleaserPropertiesTests {
@Test
public void should_return_provided_working_dir_when_it_was_set() throws Exception {
public void should_return_provided_working_dir_when_it_was_set() {
String workingDir = "foo";
ReleaserProperties properties = new ReleaserProperties();
@@ -24,14 +24,14 @@ public class ReleaserPropertiesTests {
}
@Test
public void should_return_current_working_dir_when_it_was_not_previously_set() throws Exception {
public void should_return_current_working_dir_when_it_was_not_previously_set() {
ReleaserProperties properties = new ReleaserProperties();
then(properties.getWorkingDir()).isNotEmpty();
}
@Test
public void should_return_a_copy_of_properties() throws Exception {
public void should_return_a_copy_of_properties() {
ReleaserProperties properties = new ReleaserProperties();
properties.setWorkingDir("foo");
properties.setFixedVersions(map());

View File

@@ -68,7 +68,7 @@ public class ReleaserTests {
}
@Test
public void should_not_bump_versions_for_original_release_project() throws Exception {
public void should_not_bump_versions_for_original_release_project() {
releaser(() -> new ProjectVersion("original", "1.0.0.RELEASE"))
.rollbackReleaseVersion(this.pom,
new Projects(new ProjectVersion("changed", "1.0.0.RELEASE")),
@@ -79,7 +79,7 @@ public class ReleaserTests {
}
@Test
public void should_not_bump_versions_for_original_snapshot_project_and_current_snapshot() throws Exception {
public void should_not_bump_versions_for_original_snapshot_project_and_current_snapshot() {
releaser(() -> new ProjectVersion("original", "1.0.0.BUILD-SNAPSHOT"))
.rollbackReleaseVersion(this.pom,
new Projects(new ProjectVersion("changed", "1.0.0.BUILD-SNAPSHOT")),
@@ -90,7 +90,7 @@ public class ReleaserTests {
}
@Test
public void should_bump_versions_for_original_snapshot_project() throws Exception {
public void should_bump_versions_for_original_snapshot_project() {
ProjectVersion scReleaseVersion = new ProjectVersion("changed", "1.0.0.RELEASE");
releaser(() -> new ProjectVersion("original", "1.0.0.BUILD-SNAPSHOT"))
.rollbackReleaseVersion(this.pom,
@@ -105,28 +105,28 @@ public class ReleaserTests {
}
@Test
public void should_not_generate_email_for_snapshot_version() throws Exception {
public void should_not_generate_email_for_snapshot_version() {
releaser().createEmail(new ProjectVersion("original", "1.0.0.BUILD-SNAPSHOT"), projects());
then(this.templateGenerator).should(never()).email(any(Projects.class));
}
@Test
public void should_generate_email_for_release_version() throws Exception {
public void should_generate_email_for_release_version() {
releaser().createEmail(new ProjectVersion("original", "1.0.0.RELEASE"), projects());
then(this.templateGenerator).should().email(any(Projects.class));
}
@Test
public void should_not_close_milestone_for_snapshots() throws Exception {
public void should_not_close_milestone_for_snapshots() {
releaser().closeMilestone(new ProjectVersion("original", "1.0.0.BUILD-SNAPSHOT"));
then(this.projectGitHandler).should(never()).closeMilestone(any(ProjectVersion.class));
}
@Test
public void should_not_rollback_for_snapshots() throws Exception {
public void should_not_rollback_for_snapshots() {
releaser(() -> new ProjectVersion("original", "1.0.0.BUILD-SNAPSHOT"))
.rollbackReleaseVersion(null,
new Projects(new ProjectVersion("original", "1.0.0.BUILD-SNAPSHOT")),

View File

@@ -67,8 +67,7 @@ public class ProjectDocumentationUpdaterTests {
BDDAssertions.thenThrownBy(() ->
new ProjectDocumentationUpdater(properties, new ProjectGitHandler(properties)) {
@Override String readIndexHtmlContents(File indexHtml)
throws IOException {
@Override String readIndexHtmlContents(File indexHtml) {
return "";
}
}.updateDocsRepo(releaseTrainVersion, "vAngel.SR33"))
@@ -104,8 +103,7 @@ public class ProjectDocumentationUpdaterTests {
}
@Test
public void should_not_commit_if_the_same_version_is_already_there()
throws URISyntaxException {
public void should_not_commit_if_the_same_version_is_already_there() {
ProjectVersion releaseTrainVersion = new ProjectVersion("spring-cloud-sleuth", "1.3.4.SR10");
ReleaserProperties properties = new ReleaserProperties();
properties.getGit().setDocumentationUrl(this.clonedDocProject.toURI().toString());
@@ -120,7 +118,7 @@ public class ProjectDocumentationUpdaterTests {
@Test
public void should_not_update_current_version_in_the_docs_if_current_release_starts_with_lower_letter_than_the_stored_release()
throws URISyntaxException, IOException {
throws IOException {
ProjectVersion releaseTrainVersion = new ProjectVersion("spring-cloud-sleuth", "1.3.4.SR10");
ReleaserProperties properties = new ReleaserProperties();
properties.getGit().setDocumentationUrl(this.clonedDocProject.toURI().toString());
@@ -136,7 +134,7 @@ public class ProjectDocumentationUpdaterTests {
@Test
public void should_update_current_version_in_the_docs_if_current_release_starts_with_v_and_then_higher_letter_than_the_stored_release()
throws URISyntaxException, IOException {
throws IOException {
ProjectVersion releaseTrainVersion = new ProjectVersion("spring-cloud-sleuth", "2.0.0.SR33");
ReleaserProperties properties = new ReleaserProperties();
properties.getGit().setDocumentationUrl(this.clonedDocProject.toURI().toString());
@@ -152,7 +150,7 @@ public class ProjectDocumentationUpdaterTests {
@Test
public void should_update_current_version_in_the_docs_if_current_release_starts_with_higher_letter_than_the_stored_release()
throws URISyntaxException, IOException {
throws IOException {
ProjectVersion releaseTrainVersion = new ProjectVersion("spring-cloud-sleuth", "2.0.0.SR33");
ReleaserProperties properties = new ReleaserProperties();
properties.getGit().setDocumentationUrl(this.clonedDocProject.toURI().toString());
@@ -167,8 +165,7 @@ public class ProjectDocumentationUpdaterTests {
}
@Test
public void should_not_update_current_version_in_the_docs_if_switch_is_off()
throws URISyntaxException, IOException {
public void should_not_update_current_version_in_the_docs_if_switch_is_off() {
ProjectVersion releaseTrainVersion = new ProjectVersion("spring-cloud-sleuth", "2.0.0.SR33");
ReleaserProperties properties = new ReleaserProperties();
properties.getGit().setDocumentationUrl(this.clonedDocProject.toURI().toString());

View File

@@ -54,7 +54,7 @@ public class GitRepoTests {
}
@Test
public void should_throw_exception_when_there_is_no_repo() throws IOException, URISyntaxException {
public void should_throw_exception_when_there_is_no_repo() {
thenThrownBy(() -> this.gitRepo
.cloneProject(new URIish(GitRepoTests.class.getResource("/projects/").toURI().toURL())))
.isInstanceOf(IllegalStateException.class)
@@ -62,7 +62,7 @@ public class GitRepoTests {
}
@Test
public void should_throw_an_exception_when_failed_to_initialize_the_repo() throws IOException {
public void should_throw_an_exception_when_failed_to_initialize_the_repo() {
thenThrownBy(() -> new GitRepo(this.tmpFolder,
new ExceptionThrowingJGitFactory()).cloneProject(new URIish(this.springCloudReleaseProject.toURI().toURL())))
.isInstanceOf(IllegalStateException.class)

View File

@@ -35,13 +35,13 @@ public class GithubIssuesTests {
@Rule public OutputCapture capture = new OutputCapture();
@Before
public void setup() throws URISyntaxException, IOException {
public void setup() throws IOException {
this.github = new MkGithub("spring-guides");
this.repo = createGettingStartedGuides(this.github);
}
@Test
public void should_not_do_anything_for_non_release_train_version() throws IOException {
public void should_not_do_anything_for_non_release_train_version() {
Github github = BDDMockito.mock(Github.class);
GithubIssues issues = new GithubIssues(github, withToken());
@@ -53,7 +53,7 @@ public class GithubIssuesTests {
}
@Test
public void should_not_do_anything_if_switch_is_not_set() throws IOException {
public void should_not_do_anything_if_switch_is_not_set() {
Github github = BDDMockito.mock(Github.class);
ReleaserProperties properties = withToken();
properties.getGit().setUpdateSpringGuides(false);

View File

@@ -32,7 +32,7 @@ public class GithubMilestonesTests {
@Rule public OutputCapture capture = new OutputCapture();
@Before
public void setup() throws URISyntaxException, IOException {
public void setup() throws IOException {
this.github = new MkGithub();
this.repo = createSleuthRepo(this.github);
}
@@ -44,8 +44,7 @@ public class GithubMilestonesTests {
return GithubMilestonesTests.this.repo.coordinates().user();
}
@Override String milestoneTitle(Milestone.Smart milestone)
throws IOException {
@Override String milestoneTitle(Milestone.Smart milestone) {
return "0.2.0.BUILD-SNAPSHOT";
}
};
@@ -63,8 +62,7 @@ public class GithubMilestonesTests {
return GithubMilestonesTests.this.repo.coordinates().user();
}
@Override String milestoneTitle(Milestone.Smart milestone)
throws IOException {
@Override String milestoneTitle(Milestone.Smart milestone) {
return "0.2.0";
}
};
@@ -86,8 +84,7 @@ public class GithubMilestonesTests {
return GithubMilestonesTests.this.repo.coordinates().user();
}
@Override String milestoneTitle(Milestone.Smart milestone)
throws IOException {
@Override String milestoneTitle(Milestone.Smart milestone) {
return "0.2.0";
}
};
@@ -105,8 +102,7 @@ public class GithubMilestonesTests {
return GithubMilestonesTests.this.repo.coordinates().user();
}
@Override String milestoneTitle(Milestone.Smart milestone)
throws IOException {
@Override String milestoneTitle(Milestone.Smart milestone) {
return "0.2.0.RELEASE";
}
@@ -123,7 +119,7 @@ public class GithubMilestonesTests {
}
@Test
public void should_fetch_url_of_a_closed_matching_milestone_from_cache() throws IOException {
public void should_fetch_url_of_a_closed_matching_milestone_from_cache() {
GithubMilestones milestones = new GithubMilestones(this.github, withToken());
GithubMilestones.MILESTONE_URL_CACHE.put(gaSleuthProject(), "https://github.com/spring-cloud/spring-cloud-sleuth/milestone/33?closed=1");
@@ -133,14 +129,13 @@ public class GithubMilestonesTests {
}
@Test
public void should_return_null_if_no_matching_milestone_was_found() throws IOException {
public void should_return_null_if_no_matching_milestone_was_found() {
GithubMilestones milestones = new GithubMilestones(this.github, withToken()) {
@Override String org() {
return GithubMilestonesTests.this.repo.coordinates().user();
}
@Override String milestoneTitle(Milestone.Smart milestone)
throws IOException {
@Override String milestoneTitle(Milestone.Smart milestone) {
return "0.9.0.RELEASE";
}
@@ -162,8 +157,7 @@ public class GithubMilestonesTests {
return GithubMilestonesTests.this.repo.coordinates().user();
}
@Override String milestoneTitle(Milestone.Smart milestone)
throws IOException {
@Override String milestoneTitle(Milestone.Smart milestone) {
return "0.2.0";
}
};
@@ -185,8 +179,7 @@ public class GithubMilestonesTests {
return GithubMilestonesTests.this.repo.coordinates().user();
}
@Override String milestoneTitle(Milestone.Smart milestone)
throws IOException {
@Override String milestoneTitle(Milestone.Smart milestone) {
return "0.1.0.BUILD-SNAPSHOT";
}
};

View File

@@ -56,7 +56,7 @@ public class GradleUpdaterTests {
}
@Test
public void should_throw_exception_if_snapshots_remain() throws IOException {
public void should_throw_exception_if_snapshots_remain() {
File projectRoot = tmpFile("gradleproject");
ReleaserProperties properties = new ReleaserProperties();
Map<String, String> props = new HashMap<String, String>() {{

View File

@@ -22,7 +22,7 @@ public class BomParserTests {
ReleaserProperties properties = new ReleaserProperties();
@Before
public void setup() throws IOException, URISyntaxException {
public void setup() throws URISyntaxException {
this.springCloudReleaseProject = new File(GitRepoTests.class.getResource("/projects/spring-cloud-release").toURI());
}

View File

@@ -19,97 +19,97 @@ public class LoggerToMavenLogTests {
@InjectMocks LoggerToMavenLog loggerToMavenLog;
RuntimeException exception = new RuntimeException();
@Test public void isDebugEnabled() throws Exception {
@Test public void isDebugEnabled() {
this.loggerToMavenLog.isDebugEnabled();
then(this.logger).should().isDebugEnabled();
}
@Test public void debug() throws Exception {
@Test public void debug() {
this.loggerToMavenLog.debug("foo");
then(this.logger).should().debug("foo");
}
@Test public void debug1() throws Exception {
@Test public void debug1() {
this.loggerToMavenLog.debug("foo", this.exception);
then(this.logger).should().debug("foo", this.exception);
}
@Test public void debug2() throws Exception {
@Test public void debug2() {
this.loggerToMavenLog.debug(this.exception);
then(this.logger).should().debug("Exception occurred", this.exception);
}
@Test public void isInfoEnabled() throws Exception {
@Test public void isInfoEnabled() {
this.loggerToMavenLog.isInfoEnabled();
then(this.logger).should().isInfoEnabled();
}
@Test public void info() throws Exception {
@Test public void info() {
this.loggerToMavenLog.info("foo");
then(this.logger).should().info("foo");
}
@Test public void info1() throws Exception {
@Test public void info1() {
this.loggerToMavenLog.info("foo", this.exception);
then(this.logger).should().info("foo", this.exception);
}
@Test public void info2() throws Exception {
@Test public void info2() {
this.loggerToMavenLog.info(this.exception);
then(this.logger).should().info("Exception occurred", this.exception);
}
@Test public void isWarnEnabled() throws Exception {
@Test public void isWarnEnabled() {
this.loggerToMavenLog.isWarnEnabled();
then(this.logger).should().isWarnEnabled();
}
@Test public void warn() throws Exception {
@Test public void warn() {
this.loggerToMavenLog.warn("foo");
then(this.logger).should().warn("foo");
}
@Test public void warn1() throws Exception {
@Test public void warn1() {
this.loggerToMavenLog.warn("foo", this.exception);
then(this.logger).should().warn("foo", this.exception);
}
@Test public void warn2() throws Exception {
@Test public void warn2() {
this.loggerToMavenLog.warn(this.exception);
then(this.logger).should().warn("Exception occurred", this.exception);
}
@Test public void isErrorEnabled() throws Exception {
@Test public void isErrorEnabled() {
this.loggerToMavenLog.isErrorEnabled();
then(this.logger).should().isErrorEnabled();
}
@Test public void error() throws Exception {
@Test public void error() {
this.loggerToMavenLog.error("foo");
then(this.logger).should().error("foo");
}
@Test public void error1() throws Exception {
@Test public void error1() {
this.loggerToMavenLog.error("foo", this.exception);
then(this.logger).should().error("foo", this.exception);
}
@Test public void error2() throws Exception {
@Test public void error2() {
this.loggerToMavenLog.error(this.exception);
then(this.logger).should().error("Exception occurred", this.exception);

View File

@@ -21,7 +21,7 @@ public class PropertyStorerTests {
@Mock ModifiedPomXMLEventReader pom;
@InjectMocks PropertyStorer propertyStorer;
@Test public void should_not_set_a_version_when_its_empty() throws Exception {
@Test public void should_not_set_a_version_when_its_empty() {
this.propertyStorer.setPropertyVersionIfApplicable(new Project("foo", ""));
then(this.log).should().warn(containsWarnMsgAboutEmptyVersion());

View File

@@ -196,7 +196,7 @@ public class ProjectBuilderTests {
}
@Test
public void should_throw_exception_when_after_running_there_is_an_html_file_with_unresolved_tag() throws Exception {
public void should_throw_exception_when_after_running_there_is_an_html_file_with_unresolved_tag() {
ReleaserProperties properties = new ReleaserProperties();
properties.getMaven().setBuildCommand("ls -al");
properties.setWorkingDir(tmpFile("/builder/unresolved").getPath());
@@ -207,7 +207,7 @@ public class ProjectBuilderTests {
}
@Test
public void should_throw_exception_when_command_took_too_long_to_execute() throws Exception {
public void should_throw_exception_when_command_took_too_long_to_execute() {
ReleaserProperties properties = new ReleaserProperties();
properties.getMaven().setBuildCommand("sleep 1");
properties.getMaven().setWaitTimeInMinutes(0);
@@ -312,7 +312,7 @@ public class ProjectBuilderTests {
}
@Test
public void should_throw_exception_when_deploy_command_took_too_long_to_execute() throws Exception {
public void should_throw_exception_when_deploy_command_took_too_long_to_execute() {
ReleaserProperties properties = new ReleaserProperties();
properties.getMaven().setDeployCommand("sleep 1");
properties.getMaven().setWaitTimeInMinutes(0);
@@ -404,7 +404,7 @@ public class ProjectBuilderTests {
}
@Test
public void should_throw_exception_when_publish_docs_command_took_too_long_to_execute() throws Exception {
public void should_throw_exception_when_publish_docs_command_took_too_long_to_execute() {
ReleaserProperties properties = new ReleaserProperties();
properties.getMaven().setPublishDocsCommands(new String[] { "sleep 1", "sleep 1" });
properties.getMaven().setWaitTimeInMinutes(0);
@@ -415,7 +415,7 @@ public class ProjectBuilderTests {
}
@Test
public void should_throw_exception_when_process_exits_with_invalid_code() throws Exception {
public void should_throw_exception_when_process_exits_with_invalid_code() {
ReleaserProperties properties = new ReleaserProperties();
properties.getMaven().setBuildCommand("exit 1");
properties.setWorkingDir(tmpFile("/builder/unresolved").getPath());
@@ -423,7 +423,7 @@ public class ProjectBuilderTests {
@Override
ProcessExecutor executor(String workingDir) {
return new ProcessExecutor(properties.getWorkingDir()) {
@Override Process startProcess(ProcessBuilder builder) throws IOException {
@Override Process startProcess(ProcessBuilder builder) {
return processWithInvalidExitCode();
}
};
@@ -448,7 +448,7 @@ public class ProjectBuilderTests {
return null;
}
@Override public int waitFor() throws InterruptedException {
@Override public int waitFor() {
return 0;
}

View File

@@ -44,7 +44,7 @@ public class SaganUpdaterTest {
return release;
}
@Test public void should_not_update_sagan_when_switch_is_off() throws Exception {
@Test public void should_not_update_sagan_when_switch_is_off() {
this.properties.getSagan().setUpdateSagan(false);
this.saganUpdater.updateSagan("master", version("1.0.0.M1"), version("1.0.0.M1"));
@@ -52,7 +52,7 @@ public class SaganUpdaterTest {
then(this.saganClient).shouldHaveZeroInteractions();
}
@Test public void should_update_sagan_for_milestone() throws Exception {
@Test public void should_update_sagan_for_milestone() {
this.saganUpdater.updateSagan("master", version("1.0.0.M1"), version("1.0.0.M1"));
then(this.saganClient).should().updateRelease(BDDMockito.eq("foo"),
@@ -60,7 +60,7 @@ public class SaganUpdaterTest {
"http://cloud.spring.io/spring-cloud-static/foo/{version}/", "PRERELEASE")));
}
@Test public void should_update_sagan_for_rc() throws Exception {
@Test public void should_update_sagan_for_rc() {
this.saganUpdater.updateSagan("master", version("1.0.0.RC1"), version("1.0.0.RC1"));
then(this.saganClient).should().updateRelease(BDDMockito.eq("foo"),
@@ -72,7 +72,7 @@ public class SaganUpdaterTest {
return new ProjectVersion("foo", version);
}
@Test public void should_update_sagan_from_master() throws Exception {
@Test public void should_update_sagan_from_master() {
ProjectVersion projectVersion = version("1.0.0.BUILD-SNAPSHOT");
this.saganUpdater.updateSagan("master", projectVersion, projectVersion);
@@ -82,7 +82,7 @@ public class SaganUpdaterTest {
"http://cloud.spring.io/foo/foo.html", "SNAPSHOT")));
}
@Test public void should_update_sagan_from_release_version() throws Exception {
@Test public void should_update_sagan_from_release_version() {
ProjectVersion projectVersion = version("1.0.0.RELEASE");
this.saganUpdater.updateSagan("master", projectVersion, projectVersion);
@@ -98,7 +98,7 @@ public class SaganUpdaterTest {
"http://cloud.spring.io/foo/foo.html", "SNAPSHOT")));
}
@Test public void should_update_sagan_from_non_master() throws Exception {
@Test public void should_update_sagan_from_non_master() {
ProjectVersion projectVersion = version("1.1.0.BUILD-SNAPSHOT");
this.saganUpdater.updateSagan("1.1.x", projectVersion, projectVersion);