Support MountableFile when build by GraalVM as native-build #10810
+51
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I found out that when I run Testcontainers using GraalVM and want to have support for MountableFile, it fails with following exception.
I was digging deeper and find out that it is because resources loaded using class-loader have "non-standard" File path and that's why cannot be mounted with usual code already presented in TC.
What I found is that resource should be extracted to temp directory as we already do with .jar resources, and then mounted as usual.
I would like to write tests for this, but GraalVM is needed. Do you have somewhere tests for GraalVM to point me to for inspiration?
What do you think about this change?
Thank you
Ivos
Problem with mounting-supported-check in methow
org.testcontainers.DockerClientFactory#checkMountableFile