Skip to content

Conversation

@mavcook
Copy link

@mavcook mavcook commented Feb 4, 2025

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):

docker compose up --build -d
docker exec -it meilisync-localdev-meilisync-1 poetry run pytest

@mavcook mavcook marked this pull request as draft February 5, 2025 00:40
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
```
Copy link
Author

@mavcook mavcook Feb 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mavcook mavcook marked this pull request as ready for review February 5, 2025 01:13
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.

Dev: Add easy way to run tests

1 participant