-
Notifications
You must be signed in to change notification settings - Fork 18
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
Unsupported file format exception when providing MICRONAUT_CONFIG_FILES #155
Comments
Thanks for the bug report. It's an "interesting" side effect of the test resources service being a Micronaut application itself... Let me think about it. |
I have a solution to this problem which would require a new test resources release, but only for Micronaut 3.7+. Since you are using Gradle, there is an alternative to this. You have the problem because you are running something like: MICRONAUT_CONFIG_FILES=my-config.yml ./gradlew test which exports the tasks.withType(Test).configureEach {
def overrideEnv = System.getenv("CI_MICRONAUT_CONFIG_FILES")
if (overrideEnv != null) {
inputs.property("MICRONAUT_CONFIG_FILES", overrideEnv)
environment.put("MICRONAUT_CONFIG_FILES", overrideEnv)
}
} Then on CI, instead of setting |
Thanks, that workaround did the trick! Thanks for the help. We now have a different issue, but not sure if I should create an issue for it or if it's just a config issue. It seems the mysql container that the plugin starts is always uses the database name 'test', however our Liquibase migrations sometimes use the expected db name 'verification' causing the migrations to fail due to that DB not existing. How can I change the default DB name from 'test' to something else for Mysql? It seems it might involve changing the JDBC URL from |
These docs suggest setting However, with this fix, test-resources does not see the |
Expected Behavior
Should be able to supply MICRONAUT_CONFIG_FILES env var to tests without impacting behaviour of internalStartTestResourcesService or causing an error.
Actual Behaviour
When supplying MICRONAUT_CONFIG_FILES environment variable, I get the following exception in the internalStartTestResourcesService build job, this causes the test build to hang indefinetely:
Steps To Reproduce
Environment Information
No response
Example Application
No response
Version
3.6.2
The text was updated successfully, but these errors were encountered: