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 native build and I want to have support for
MountableFilefrom class path, 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 with prefix
resource:and that's why it cannot be mounted with usual code already presented in TC.What I found out is that resource should be extracted to temp directory as we already do with
.jarresources, and then mounted as usual.I would like to write tests for this, but GraalVM is needed to make it reproducible. Do you have somewhere tests for GraalVM to point me to for inspiration?
What do you think about this change?
Thank you
Ivos
issue here #10191
Problem with mounting-supported-check in methow
org.testcontainers.DockerClientFactory#checkMountableFile