-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Exception when running tests under Windows 8 #919
Comments
Solved by checking the source code. Testcontainers is actually looking for docker-machine.exe and for that, checks every directory in the path environment variable until it finds it. So '"' symbol should be removed from there. if using Eclipse, you should restart it after that. |
I stumbled into the same exact problem for someone in the team. The root cause of the problem was that there was a directory location added to the |
On a side note, Docker Toolbox (as utilized on Windows 8) is not officially supported by Testcontainers anymore and not actively tested by us. Also see https://www.testcontainers.org/supported_docker_environment/. |
@kiview thanks for sharing that additional context. In my case we hit this problem on windows 10. The OS is a newer one but the root cause was the same. Maybe we could consider wrapping this exception and putting in a more descriptive error message. I ask because we spent a couple of hours looking for the cause and only because of this defect we were able to identify the root cause. |
I hear you, but I am not sure if Testcontainers should have additional handling for this. But I wonder, if a directory with a |
@kiview - Could be.. I am not sure.. But for sure it doesnt seem to be able to handle the quotes in the path, while I dont see the problem happen in OSX. |
In
Within a |
Maybe it is even better to simply log |
Exactly. However, I'd still like to understand if this is something to be expected as an element in the Windows testcontainers-java/core/src/main/java/org/testcontainers/utility/CommandLine.java Line 77 in 9c09b43
In this case, we should fix the parsing of the Windows I personally feel, adding |
I found similar issue in Windows 10 and corrected Windows environment variable where I was seeing my PATH variables quoted in "". Removal of "" from Environment Variable --> path variable Fix the issue. |
Hi,
I'm trying to run unit tests using testcontainers and Docker toolbox. All tests fail because of this exception:
Caused by: java.nio.file.InvalidPathException: Illegal char <"> at index 0: "C:\Program Files (x86)\Git\bin" at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182) at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153) at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94) at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255) at java.nio.file.Paths.get(Paths.java:84) at org.testcontainers.utility.CommandLine.executableExists(CommandLine.java:67) at org.testcontainers.utility.DockerMachineClient.isInstalled(DockerMachineClient.java:53)
My bash.exe is not there anyway. But even if it was, it would throw the same exception I guess. How can I update this path?
The text was updated successfully, but these errors were encountered: