Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- image: docker:latest
- services:
- - docker:dind
- variables:
- DOCKER_DRIVER: overlay
- M2_REPO: .m2/repository
- stages:
- - test
- test:
- image: maven:3-jdk-8
- stage: test
- tags:
- - docker
- script: |
- mvn verify test
- artifacts:
- paths:
- - core.*
- - hs_err_pid*.log
- import org.junit.Rule;
- import org.junit.Test;
- import org.testcontainers.containers.PostgreSQLContainer;
- import static org.junit.Assert.assertNotNull;
- public class TestContainerExampleTest {
- @Rule
- public PostgreSQLContainer postgres = new PostgreSQLContainer();
- @Test
- public void test() {assertNotNull(postgres.getJdbcUrl());}
- }
- Apr 18, 2018 6:05:21 AM org.testcontainers.dockerclient.EnvironmentAndSystemPropertyClientProviderStrategy test
- ERROR: ping failed with configuration Environment variables, system properties and defaults. Resolved:
- dockerHost=unix:///var/run/docker.sock
- apiVersion='{UNKNOWN_VERSION}'
- registryUrl='https://index.docker.io/v1/'
- registryUsername='root'
- registryPassword='null'
- registryEmail='null'
- dockerConfig='DefaultDockerClientConfig[dockerHost=unix:///var/run/docker.sock,registryUsername=root,registryPassword=<null>,registryEmail=<null>,registryUrl=https://index.docker.io/v1/,dockerConfig=/root/.docker,sslConfig=<null>,apiVersion={UNKNOWN_VERSION}]'
- due to org.rnorth.ducttape.TimeoutException: Timeout waiting for result with exception
- org.rnorth.ducttape.TimeoutException: Timeout waiting for result with exception
- at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:51)
- <blablabla...>
- at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
- Caused by: org.testcontainers.shaded.io.netty.channel.AbstractChannel$AnnotatedConnectException: connect(..) failed: No such file or directory: /var/run/docker.sock
- at org.testcontainers.shaded.io.netty.channel.unix.Errors.throwConnectException(Errors.java:107)
- <blablabla...>
- at java.lang.Thread.run(Thread.java:748)
- Caused by: java.net.ConnectException: connect(..) failed: No such file or directory
- ... 23 more
- Apr 18, 2018 6:05:21 AM org.testcontainers.dockerclient.DockerClientProviderStrategy lambda$getFirstValidStrategy$2
- ERROR: Could not find a valid Docker environment. Please check configuration. Attempted configurations were:
- Apr 18, 2018 6:05:21 AM org.testcontainers.dockerclient.DockerClientProviderStrategy lambda$getFirstValidStrategy$2
- ERROR: EnvironmentAndSystemPropertyClientProviderStrategy: failed with exception InvalidConfigurationException (ping failed)
- Apr 18, 2018 6:05:21 AM org.testcontainers.dockerclient.DockerClientProviderStrategy lambda$getFirstValidStrategy$2
- ERROR: UnixSocketClientProviderStrategy: failed with exception InvalidConfigurationException (ping failed). Root cause NoSuchFileException (/var/run/docker.sock)
- Apr 18, 2018 6:05:21 AM org.testcontainers.dockerclient.DockerClientProviderStrategy lambda$getFirstValidStrategy$2
- ERROR: As no valid configuration was found, execution cannot continue
- Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 10.693 sec <<< FAILURE!
- test(ru.bcs.userstorage.online.integration.provider.TestContainerExampleTest) Time elapsed: 0.005 sec <<< ERROR!
- java.lang.IllegalStateException: Could not find a valid Docker environment. Please see logs and check configuration
- at org.testcontainers.dockerclient.DockerClientProviderStrategy.lambda$getFirstValidStrategy$2(DockerClientProviderStrategy.java:146)
- <blablabla...>
- Results :
- Tests in error:
- test(ru.bcs.userstorage.online.integration.provider.TestContainerExampleTest): Could not find a valid Docker environment. Please see logs and check configuration
- Tests run: 52, Failures: 0, Errors: 1, Skipped: 4
Add Comment
Please, Sign In to add comment