Dev: Tests: Make tests runnable through docker#119
Open
mavcook wants to merge 3 commits intolong2ice:devfrom
Open
Dev: Tests: Make tests runnable through docker#119mavcook wants to merge 3 commits intolong2ice:devfrom
mavcook wants to merge 3 commits intolong2ice:devfrom
Conversation
mavcook
commented
Feb 5, 2025
Comment on lines
+234
to
+248
| Mongo | ||
| ``` | ||
| docker exec -it meilisync-localdev-meilisync-1 meilisync --config tests/config/mongo.yml start | ||
| docker exec -it meilisync-localdev-meilisync-1 poetry run pytest tests/test_mongo.py | ||
| ``` | ||
| MySQL | ||
| ``` | ||
| docker exec -it meilisync-localdev-meilisync-1 meilisync --config tests/config/mysql.yml start | ||
| docker exec -it meilisync-localdev-meilisync-1 poetry run pytest tests/test_mysql.py | ||
| ``` | ||
| Postgres | ||
| ``` | ||
| docker exec -it meilisync-localdev-meilisync-1 meilisync --config tests/config/postgres.yml start | ||
| docker exec -it meilisync-localdev-meilisync-1 poetry run pytest tests/test_postgres.py | ||
| ``` |
Author
There was a problem hiding this comment.
I would ideally like running the tests to be only one command (docker exec -it meilisync-localdev-meilisync-1 poetry run pytest). However, each test suite needs meilisync running with its specific config (mongo.yml, mysql.yml, or postgres.yml) before the tests can execute.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #118
This gets the bare minimum existing tests runnable via Docker.
It is not the best testing setup --- lots of room for improvements --- just what I could get running quickly with minimal code changes. Happy to clean it up some, especially if given help/recommendations on how to handle more versions of databases.
Usage preview (full details in README):