Sitelet https://github.com/jasync-sql/jasync-sql/pull/357
Skip to content

Fix MySQL startup in Testcontainers - #357

Merged
oshai merged 2 commits into
jasync-sql:masterfrom
KarboniteKream:fix/docker-mac
Jan 14, 2023
Merged

oshai merged 2 commits into
jasync-sql:masterfrom
KarboniteKream:fix/docker-mac

Conversation

@KarboniteKream

@KarboniteKream KarboniteKream commented Jan 14, 2023 •

Copy link
Copy Markdown
Contributor

Description

This PR fixes the MySQLContainer configuration to have the container successfully start. Testcontainers uses the credentials provided using withUsername() and withPassword() to connect to the container and confirm it has started. With the current implementation of configure(), the state is never correctly set and Testcontainers cannot connect.

Detailed changes

  • Move some environment variables out of configure() so Testcontainers is correctly configured
  • Bump testcontainers to latest version, to make it work on M1 Macs (fixes JNA dependency and adds support for amd64 images). Closes build(deps): bump testcontainers to 1.17.5 #324.
  • Update .gitignore to ignore more test logs

Notes

The unix socket exposed in #319 does not work correctly under Docker for Mac with VirtioFS enabled, and also prevents container startup due to permission issues. Switching to gRPC FUSE or osxfs is a temporary workaround until it's fixed on Docker side.

@KarboniteKream KarboniteKream changed the title Fix MySQL start up in Testcontainers Fix MySQL startup in Testcontainers Jan 14, 2023
@oshai
oshai merged commit 2fdfaab into jasync-sql:master Jan 14, 2023
@oshai

oshai commented Jan 14, 2023

Copy link
Copy Markdown
Contributor

Thanks for the PR!

@KarboniteKream
KarboniteKream deleted the fix/docker-mac branch January 14, 2023 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants