testcontainers-java-examples icon indicating copy to clipboard operation
testcontainers-java-examples copied to clipboard

Tests fail on Windows 10

Open synergiator opened this issue 7 years ago • 1 comments

Environment: Windows 10 native client.

Checkout and run:

mvn verify

Error:

: failed with exception message: ping failed
08:54:18.892 [main] ERROR org.testcontainers.dockerclient.DockerConfigurationStrategy -     docker-machine: failed with exception message: Exception when executing docker-machine.exe status
08:54:18.892 [main] ERROR org.testcontainers.dockerclient.DockerConfigurationStrategy -     local Unix socket (unix:///var/run/docker.sock): failed with exception message: ping failed
08:54:18.892 [main] ERROR org.testcontainers.dockerclient.DockerConfigurationStrategy - As no valid configuration was found, execution cannot continue

Output docker version:

Client:
 Version:       17.12.0-ce
 API version:   1.35
 Go version:    go1.9.2
 Git commit:    c97c6d6
 Built: Wed Dec 27 20:05:22 2017
 OS/Arch:       windows/amd64

Server:
 Engine:
  Version:      17.12.0-ce
  API version:  1.35 (minimum version 1.12)
  Go version:   go1.9.2
  Git commit:   c97c6d6
  Built:        Wed Dec 27 20:12:29 2017
  OS/Arch:      linux/amd64
  Experimental: true

synergiator avatar Mar 16 '18 08:03 synergiator

UPD

With native Windows 10 Docker, things work regarding finding Docker, if the dependency is changed to the following (i.e. by removing the substring windows-support):

<testcontainers.version>-SNAPSHOT</testcontainers.version>

However, a test fails then for some other reason - a class is not found.

11:40:43.724 [main] INFO  org.testcontainers.DockerClientFactory - Connected to docker:
  Server Version: 17.12.0-ce
  API Version: 1.35
  Operating System: Docker for Windows
  Total Memory: 23543 MB
11:40:45.055 [main] INFO  org.testcontainers.DockerClientFactory - Ryuk started - will monitor and terminate Testcontainers containers on JVM exit
        ?? Checking the system...
        ? Docker version should be at least 1.6.0
11:40:45.226 [main] INFO  docker[redis:3.0.6] - Pulling docker image: redis:3.0.6. Please be patient; this may take some time but only needs to be done once.
11:40:45.343 [main] INFO  docker[redis:3.0.6] - Pulling docker image: redis:3.0.6. Please be patient; this may take some time but only needs to be done once.
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 2.863 sec <<< FAILURE!
testNotFindingAValueThatWasNotInserted(RedisBackedCacheTest)  Time elapsed: 0.005 sec  <<< ERROR!
java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Base64
        at com.github.dockerjava.core.AuthConfigFile.decodeAuth(AuthConfigFile.java:178)
        at com.github.dockerjava.core.AuthConfigFile.loadConfig(AuthConfigFile.java:140)
        at com.github.dockerjava.core.DefaultDockerClientConfig.effectiveAuthConfig(DefaultDockerClientConfig.java:266)
        at com.github.dockerjava.core.DockerClientImpl.pullImageCmd(DockerClientImpl.java:215)

synergiator avatar Mar 16 '18 10:03 synergiator