Skip to content
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

replacing wix-embedded-mysql with testcontainers-java #2384

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

abvaidya
Copy link
Collaborator

@abvaidya abvaidya commented Oct 30, 2023

Description

Contribution Checklist:

  • The pull request does not introduce any breaking changes
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Attach Screenshots (Optional)

@abvaidya
Copy link
Collaborator Author

Fixes #2384

@abvaidya abvaidya force-pushed the testcontainers branch 13 times, most recently from c9ce594 to c3cbf0c Compare October 30, 2023 05:10
Signed-off-by: Abhijeet V <31417623+abvaidya@users.noreply.github.com>
@abvaidya
Copy link
Collaborator Author

Testcontainers for Java is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.
This PR replaces the in-memory wix-embedded-mysql with testcontainers mysql module. https://java.testcontainers.org/modules/databases/mysql/

https://github.com/wix-incubator/wix-embedded-mysql has been deprecated in favor of testcontainers.

@abvaidya
Copy link
Collaborator Author

The testcontainers project makes the relevant dependency ( in our case mysql ) available via docker container, hence there are changes needed in screwdriver.yaml workflow to install docker

Not related to this PR, but while adding code to install docker, I noticed nodejs installation was using a deprecated method, so changed that as well.

build script copies the zms schema from schema/ source dir in src/test/resources since thats the path used by testcontainers for any init script, we are using that feature to setup the zms tables for testing.

With this change, to be able to run Athenz build locally, developers should have a testcontainers compatible container runtime ( it works great with docker desktop ).

Signed-off-by: Abhijeet V <31417623+abvaidya@users.noreply.github.com>
@havetisyan havetisyan merged commit 07045f4 into master Oct 30, 2023
2 checks passed
@havetisyan havetisyan deleted the testcontainers branch October 30, 2023 18:18
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