-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce Quarkus 3.18 Migration Scripts
- This removes the `quarkus.flyway.clean-on-validation-error`. See quarkusio/quarkus#44912
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
recipes-tests/src/test/java/io/quarkus/updates/core/CoreUpdate318Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package io.quarkus.updates.core; | ||
|
||
import org.intellij.lang.annotations.Language; | ||
import org.junit.jupiter.api.Test; | ||
import org.openrewrite.java.JavaParser; | ||
import org.openrewrite.test.RecipeSpec; | ||
import org.openrewrite.test.RewriteTest; | ||
import org.openrewrite.test.TypeValidation; | ||
|
||
import java.nio.file.Path; | ||
|
||
import static org.openrewrite.properties.Assertions.properties; | ||
|
||
public class CoreUpdate318Test implements RewriteTest { | ||
|
||
@Override | ||
public void defaults(RecipeSpec spec) { | ||
CoreTestUtil.recipe(spec, Path.of("quarkus-updates", "core", "3.18.yaml"), "3.18.0") | ||
.parser(JavaParser.fromJavaVersion().logCompilationWarningsAndErrors(true)) | ||
.typeValidationOptions(TypeValidation.none()); | ||
} | ||
|
||
@Test | ||
void testFlywayConfigurationUpdated() { | ||
|
||
@Language("properties") | ||
String originalProperties = """ | ||
quarkus.flyway."datasource-name".clean-on-validation-error=true | ||
%test.quarkus.flyway."datasource-name".clean-on-validation-error=true | ||
quarkus.flyway.clean-on-validation-error=true | ||
"""; | ||
|
||
@Language("properties") | ||
String afterProperties = """ | ||
"""; | ||
|
||
rewriteRun(properties(originalProperties, afterProperties, spec -> spec.path("src/main/resources/application.properties"))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
##### | ||
# Remove the `quarkus.flyway.clean-on-validation-error` property | ||
##### | ||
--- | ||
type: specs.openrewrite.org/v1beta/recipe | ||
name: io.quarkus.updates.core.quarkus318.RemoveFlywayCleanOnValidationError | ||
recipeList: | ||
- org.openrewrite.quarkus.DeleteQuarkusProperty: | ||
propertyKey: quarkus\.flyway\.(.+\.)?clean-on-validation-error |