Skip to content

Configure Docker on CI #295

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

Closed
wilkinsona opened this issue Sep 29, 2021 · 2 comments
Closed

Configure Docker on CI #295

wilkinsona opened this issue Sep 29, 2021 · 2 comments
Assignees
Milestone

Comments

@wilkinsona
Copy link
Contributor

With the recent addition of Testcontainers to the test suite, we need to configure CI to make Docker available.

@wilkinsona wilkinsona added this to the 0.0.29 milestone Sep 29, 2021
@wilkinsona wilkinsona self-assigned this Sep 29, 2021
@wilkinsona
Copy link
Contributor Author

Hijacking the CI container and running the build results in FormatterIntegrationTests – the tests that use Testcontainers – being skipped:

[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
16:19:13.797 [main] ERROR org.testcontainers.dockerclient.DockerClientProviderStrategy - Could not find a valid Docker environment. Please check configuration. Attempted configurations were:
16:19:13.801 [main] ERROR org.testcontainers.dockerclient.DockerClientProviderStrategy -     UnixSocketClientProviderStrategy: failed with exception InvalidConfigurationException (Could not find unix domain socket). Root cause NoSuchFileException (/var/run/docker.sock)
16:19:13.801 [main] ERROR org.testcontainers.dockerclient.DockerClientProviderStrategy -     UnixSocketClientProviderStrategy: failed with exception InvalidConfigurationException (Could not find unix domain socket). Root cause NoSuchFileException (/var/run/docker.sock)
16:19:13.801 [main] ERROR org.testcontainers.dockerclient.DockerClientProviderStrategy - As no valid configuration was found, execution cannot continue
[INFO] Running io.spring.javaformat.formatter.FormatterIntegrationTests
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.001 s - in io.spring.javaformat.formatter.FormatterIntegrationTests

When run as part of the CI build, the tests fail but the related output is pretty minimal:

05:54:18
[ERROR] Errors: 
[ERROR]   FormatterIntegrationTests.formatCode:56 ? ContainerLaunch Container startup fa...
[ERROR]   FormatterIntegrationTests.formatCode:56 ? ContainerLaunch Container startup fa...
[ERROR]   FormatterIntegrationTests.formatCode:56 ? ContainerLaunch Container startup fa...

@wilkinsona
Copy link
Contributor Author

With the Docker daemon started in the hijacked container, the tests then fail due to Docker Hub's rate limiting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant