{"repo":"radcortez/flyway-junit5-extensions","free":true,"listed":false,"github":"https://github.com/radcortez/flyway-junit5-extensions","clone":"git clone https://github.com/radcortez/flyway-junit5-extensions.git","description":"Flyway JUnit 5 Extension to clean / migrate your database in tests.","language":"Java","stars":19,"topics":["flyway","junit","junit5","database","test","tests","testing"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"Flyway JUnit 5 Extensions This extensions allows you to clean / migrate your database using Flyway during testing. How to use it? Add the following dependency to your project: --- NOTE : This project depends on: - Flyway 11.8.0 - JUnit Jupiter 5.11.4 --- Add the @FlywayTest annotation to your test class or method. By default, Flyway will perform the migrate action before each test execution and the clean action after the test. This can be disabled by turning clean = false in the @FlywayTest annotation. The only required information in the @FlywayTest annotation is the database information that you can supply using the inner @DataSource annotation. In the @DataSource annotation you can specify the url , username and password to connect to a running database: Or you can implement a DataSourceProvider and return a DataSourceInfo with the database connection details: The DataSourceProvider will always take priority over url , username and password in the @DataSource annotation. The @FlywayTest annotation can also be placed in a method. When both the class and the method are annotated, the annotations metadata is merged with the method annotation taking priority over the class annotation. Conventions The extension uses the default path to load migration scripts from Flyway, set in resources/db/migration . If you want to add specific database migrations to a particular test, you can place the migration files in resources/db/ plus the fully qualified name of the test as a path. For ","default_branch":null,"files":null,"tree":[],"storefront":"/r/radcortez","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/radcortez/flyway-junit5-extensions/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}