From dd6a79facc1530b52efad8b22c7216a144a73855 Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Tue, 7 Jan 2025 10:13:13 +0100 Subject: [PATCH] Polish "Add Spring Boot 3 to DefaultMavenVersionResolverTests" See gh-1611 --- .../DefaultMavenVersionResolverTests.java | 27 +++++++------------ 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/initializr-version-resolver/src/test/java/io/spring/initializr/versionresolver/DefaultMavenVersionResolverTests.java b/initializr-version-resolver/src/test/java/io/spring/initializr/versionresolver/DefaultMavenVersionResolverTests.java index 63dd840efa..5a7f6dbb15 100644 --- a/initializr-version-resolver/src/test/java/io/spring/initializr/versionresolver/DefaultMavenVersionResolverTests.java +++ b/initializr-version-resolver/src/test/java/io/spring/initializr/versionresolver/DefaultMavenVersionResolverTests.java @@ -43,13 +43,6 @@ void createResolver(@TempDir Path temp) { @Test void resolveDependenciesForSpringBoot() { - Map versions = this.resolver.resolveDependencies("org.springframework.boot", - "spring-boot-dependencies", "2.1.5.RELEASE"); - assertThat(versions).containsEntry("org.flywaydb:flyway-core", "5.2.4"); - } - - @Test - void resolveDependenciesForSpringBoot3() { Map versions = this.resolver.resolveDependencies("org.springframework.boot", "spring-boot-dependencies", "3.4.1"); assertThat(versions).containsEntry("io.micrometer:micrometer-core", "1.14.2") @@ -60,21 +53,21 @@ void resolveDependenciesForSpringBoot3() { @Test void resolveDependenciesForSpringCloud() { Map versions = this.resolver.resolveDependencies("org.springframework.cloud", - "spring-cloud-dependencies", "Greenwich.SR1"); - assertThat(versions).containsEntry("com.netflix.ribbon:ribbon", "2.3.0"); + "spring-cloud-dependencies", "2024.0.0"); + assertThat(versions).containsEntry("com.netflix.eureka:eureka-client", "2.0.4"); } @Test void resolveDependenciesUsingMilestones() { Map versions = this.resolver.resolveDependencies("org.springframework.boot", - "spring-boot-dependencies", "2.2.0.M3"); - assertThat(versions).containsEntry("org.flywaydb:flyway-core", "5.2.4"); + "spring-boot-dependencies", "3.4.0-M1"); + assertThat(versions).containsEntry("org.flywaydb:flyway-core", "10.15.2"); } @Test void resolveDependenciesUsingSnapshots() { Map versions = this.resolver.resolveDependencies("org.springframework.boot", - "spring-boot-dependencies", "2.4.0-SNAPSHOT"); + "spring-boot-dependencies", "3.4.0-SNAPSHOT"); assertThat(versions).isNotEmpty(); } @@ -88,15 +81,15 @@ void resolveDependenciesForNonExistentDependency() { @Test void resolvePluginsForSpringBoot() { Map versions = this.resolver.resolvePlugins("org.springframework.boot", - "spring-boot-starter-parent", "3.1.1"); - assertThat(versions).containsEntry("org.springframework.boot:spring-boot-maven-plugin", "3.1.1"); + "spring-boot-starter-parent", "3.4.1"); + assertThat(versions).containsEntry("org.springframework.boot:spring-boot-maven-plugin", "3.4.1"); } @Test void resolvePluginsUsingMilestones() { Map versions = this.resolver.resolvePlugins("org.springframework.boot", - "spring-boot-dependencies", "2.2.0.M3"); - assertThat(versions).containsEntry("org.springframework.boot:spring-boot-maven-plugin", "2.2.0.M3"); + "spring-boot-dependencies", "3.4.0-M1"); + assertThat(versions).containsEntry("org.springframework.boot:spring-boot-maven-plugin", "3.4.0-M1"); } @Test @@ -109,7 +102,7 @@ void resolvePluginsUsingMilestoneThatHasResolutionProblem() { @Test void resolvePluginsUsingSnapshots() { Map versions = this.resolver.resolvePlugins("org.springframework.boot", - "spring-boot-dependencies", "2.4.0-SNAPSHOT"); + "spring-boot-dependencies", "3.4.0-SNAPSHOT"); assertThat(versions).isNotEmpty(); }