Skip to content

Commit 26f5dbd

Browse files
committed
Move uncategorized tests to their most appropriate boot/framework version test configuration folder.
1 parent fbd5816 commit 26f5dbd

File tree

15 files changed

+15
-20
lines changed

15 files changed

+15
-20
lines changed

build.gradle.kts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -207,18 +207,12 @@ dependencies {
207207
testImplementation("org.openrewrite:rewrite-java-11:${rewriteVersion}")
208208
testImplementation("org.openrewrite:rewrite-java-8:${rewriteVersion}")
209209

210-
testRuntimeOnly("org.springframework:spring-beans:latest.release")
211-
testRuntimeOnly("org.springframework:spring-context:latest.release")
212-
testRuntimeOnly("org.springframework:spring-web:latest.release")
213-
testRuntimeOnly("org.springframework:spring-webmvc:latest.release")
214-
testRuntimeOnly("org.springframework:spring-test:latest.release")
215-
testRuntimeOnly("org.springframework.boot:spring-boot-test:latest.release")
216-
testRuntimeOnly("org.springframework.boot:spring-boot-test-autoconfigure:latest.release")
217-
218210
"testWithSpringBoot_1_5RuntimeOnly"("org.springframework:spring-web:4.+")
219211
"testWithSpringBoot_1_5RuntimeOnly"("org.springframework.boot:spring-boot:1.5.+")
220212
"testWithSpringBoot_1_5RuntimeOnly"("org.springframework.boot:spring-boot-autoconfigure:1.5.+")
221213
"testWithSpringBoot_1_5RuntimeOnly"("org.springframework.boot:spring-boot-test:1.5.+")
214+
"testWithSpringBoot_1_5RuntimeOnly"("org.hamcrest:hamcrest:2.2")
215+
"testWithSpringBoot_1_5RuntimeOnly"("junit:junit:latest.release")
222216

223217
"testWithSpringBoot_2_1RuntimeOnly"("org.springframework:spring-web:5.1.+")
224218
"testWithSpringBoot_2_1RuntimeOnly"("org.springframework.boot:spring-boot:2.1.+")
@@ -227,7 +221,7 @@ dependencies {
227221
"testWithSpringBoot_2_2RuntimeOnly"("org.springframework.boot:spring-boot:2.2.+")
228222

229223
"testWithSpringBoot_2_3RuntimeOnly"("org.openrewrite.recipe:rewrite-testing-frameworks:${rewriteVersion}")
230-
"testWithSpringBoot_2_3RuntimeOnly"("org.springframework:spring-test:4.+")
224+
"testWithSpringBoot_2_3RuntimeOnly"("org.springframework:spring-test:5.3.+")
231225
"testWithSpringBoot_2_3RuntimeOnly"("junit:junit:latest.release")
232226
"testWithSpringBoot_2_3RuntimeOnly"("org.hamcrest:hamcrest:2.2")
233227
"testWithSpringBoot_2_3RuntimeOnly"("org.springframework.boot:spring-boot-test:1.5.+")
@@ -246,9 +240,13 @@ dependencies {
246240
"testWithSpringBoot_2_4RuntimeOnly"("org.springframework:spring-context:5.3.+")
247241
"testWithSpringBoot_2_4RuntimeOnly"("org.springframework:spring-orm:5.3.+")
248242
"testWithSpringBoot_2_4RuntimeOnly"("org.springframework:spring-web:5.3.+")
243+
"testWithSpringBoot_2_4RuntimeOnly"("org.springframework:spring-webmvc:5.3.+")
249244
"testWithSpringBoot_2_4RuntimeOnly"("jakarta.persistence:jakarta.persistence-api:2.2.3")
250245
"testWithSpringBoot_2_4RuntimeOnly"("org.springframework.data:spring-data-jpa:2.4.+")
251246
"testWithSpringBoot_2_4RuntimeOnly"("org.springframework.data:spring-data-jdbc:2.1.+")
247+
"testWithSpringBoot_2_4RuntimeOnly"("org.springframework:spring-test:5.3.+")
248+
"testWithSpringBoot_2_4RuntimeOnly"("org.springframework.boot:spring-boot-test:2.4.+")
249+
"testWithSpringBoot_2_4RuntimeOnly"("org.springframework.boot:spring-boot-test-autoconfigure:2.4.+")
252250

253251
"testWithSpringFramework_5_1RuntimeOnly"("org.springframework:spring-core:5.1.+")
254252

@@ -259,6 +257,7 @@ dependencies {
259257
"testWithSpringFramework_5_3RuntimeOnly"("org.springframework:spring-beans:5.3.+")
260258
"testWithSpringFramework_5_3RuntimeOnly"("org.springframework:spring-tx:5.3.+")
261259
"testWithSpringFramework_5_3RuntimeOnly"("org.springframework:spring-jdbc:5.3.+")
260+
"testWithSpringFramework_5_3RuntimeOnly"("org.springframework:spring-web:5.3.+")
262261

263262
"testWithSpringBoot_2_5RuntimeOnly"("org.springframework.boot:spring-boot:2.5.+")
264263

src/test/kotlin/org/openrewrite/java/spring/SeparateApplicationYamlByProfileTest.kt renamed to src/testWithSpringBoot_2_4/kotlin/org/openrewrite/java/spring/SeparateApplicationYamlByProfileTest.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.openrewrite.java.spring.org.openrewrite.java.spring
16+
package org.openrewrite.java.spring
1717

1818
import org.assertj.core.api.Assertions.assertThat
1919
import org.junit.jupiter.api.Test
2020
import org.openrewrite.Recipe
2121
import org.openrewrite.Result
22-
import org.openrewrite.java.spring.SeparateApplicationYamlByProfile
2322
import org.openrewrite.yaml.YamlParser
2423
import org.openrewrite.yaml.YamlRecipeTest
2524
import java.nio.file.Paths

src/test/kotlin/org/openrewrite/java/spring/boot2/search/IntegrationSchedulerPoolRecipeTest.kt renamed to src/testWithSpringBoot_2_4/kotlin/org/openrewrite/java/spring/boot2/search/IntegrationSchedulerPoolRecipeTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.openrewrite.java.spring.org.openrewrite.java.spring.boot2.search
16+
package org.openrewrite.java.spring.boot2.search
1717

1818
import org.junit.jupiter.api.Test
1919
import org.openrewrite.java.JavaParser

src/test/kotlin/org/openrewrite/java/spring/boot2/search/LoggingShutdownHooksTest.kt renamed to src/testWithSpringBoot_2_4/kotlin/org/openrewrite/java/spring/boot2/search/LoggingShutdownHooksTest.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.openrewrite.java.spring.org.openrewrite.java.spring.boot2.search
16+
package org.openrewrite.java.spring.boot2.search
1717

1818
import org.assertj.core.api.Assertions.assertThat
1919
import org.junit.jupiter.api.Test
2020
import org.openrewrite.Recipe
2121
import org.openrewrite.java.JavaParser
22-
import org.openrewrite.java.spring.boot2.search.LoggingShutdownHooks
2322
import org.openrewrite.maven.MavenParser
2423
import org.openrewrite.maven.MavenRecipeTest
2524

src/test/kotlin/org/openrewrite/java/spring/cve/Spring4ShellTest.kt renamed to src/testWithSpringBoot_2_4/kotlin/org/openrewrite/java/spring/cve/Spring4ShellTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.openrewrite.java.spring.org.openrewrite.java.spring.cve
16+
package org.openrewrite.java.spring.cve
1717

1818
import org.junit.jupiter.api.Test
1919
import org.openrewrite.Recipe
@@ -25,7 +25,7 @@ class Spring4ShellTest : JavaRecipeTest {
2525
override val parser: JavaParser
2626
get() = JavaParser.fromJavaVersion()
2727
.logCompilationWarningsAndErrors(true)
28-
.classpath("spring-beans", "spring-boot", "spring-context")
28+
.classpath("spring-beans", "spring-boot", "spring-context","spring-web", "spring-webmvc","spring-boot-autoconfigure")
2929
.build()
3030

3131
override val recipe: Recipe

src/test/kotlin/org/openrewrite/java/spring/UpdateApiManifestTest.kt renamed to src/testWithSpringFramework_5_3/kotlin/org/openrewrite/java/spring/UpdateApiManifestTest.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.openrewrite.java.spring.org.openrewrite.java.spring
16+
package org.openrewrite.java.spring
1717

1818
import org.assertj.core.api.Assertions.assertThat
1919
import org.junit.jupiter.api.Test
2020
import org.openrewrite.Recipe
2121
import org.openrewrite.java.JavaParser
2222
import org.openrewrite.java.JavaRecipeTest
23-
import org.openrewrite.java.spring.UpdateApiManifest
2423
import java.nio.file.Paths
2524

2625
class UpdateApiManifestTest : JavaRecipeTest {

src/test/kotlin/org/openrewrite/java/spring/YamlPropertiesToKebabCaseTest.kt renamed to src/testWithSpringFramework_5_3/kotlin/org/openrewrite/java/spring/YamlPropertiesToKebabCaseTest.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.openrewrite.java.spring.org.openrewrite.java.spring
16+
package org.openrewrite.java.spring
1717

1818
import org.junit.jupiter.api.Test
1919
import org.junit.jupiter.api.io.TempDir
2020
import org.openrewrite.Recipe
21-
import org.openrewrite.java.spring.YamlPropertiesToKebabCase
2221
import org.openrewrite.yaml.YamlRecipeTest
2322
import java.nio.file.Path
2423

0 commit comments

Comments
 (0)