-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
locationsForMigrate with missing location does not fail #68
Comments
The Test extensions used the Flyway location feature. The currently behaviour will not change, because this change will possible break old test. One solution can be that the @flyway get a flag 'failOnMissingLocations' with a default 'false'. |
The current Flyway implementation for the location scanning support not a enhancement or a notification support, so I see no possibility to get the information about location that not exist. A detection can only be done by a own implementation. Such a implementation contains the possibility about wrong error detection - detect error for correct location or detect no error for missing location, because it do not use the real Flyway implementation. (See https://github.com/flyway/flyway/blob/master/flyway-core/src/main/java/org/flywaydb/core/internal/scanner/filesystem/FileSystemScanner.java or Currently I will postpone this feature |
If this is Flyway's behaviour, you should certainly stick with their approach. While this behaviour was unexpected to me, I think it would be worse to start doing things differently. Emulating the parent system as closely as possible should be the goal. It might be worth updating the documentation so it's clear what will happen. |
Flyway 7.9.0 included a flag to allow fail-fast behavior in case of missing locations flyway.failOnMissingLocations |
When using the
locationsForMigrate
directive, if any of the supplied locations are missing (i.e. the specified folder doesn't exist) then the tests are run with no complaint. I would expect the test to fail in this instance and report that the specified migrations could not be run.The text was updated successfully, but these errors were encountered: