Hello everyone!
The current mock of the MeiliSearch server makes me a little worried about our tests. I would rather have tests running against a real MeiliSearch server. The goal is to be sure this package works in production against the latest version of MeiliSearch.
Indeed, MeiliSearch and meilisearch-php are not stable yet, and each modification in the MeiliSearch server enforces us to update the mock. Otherwise, our tests are not up to date with the last modifications of MeiliSearch and our package could contain errors without noticing them.
I don't say we should remove the mocked part, but we should at least have the integration test part against a real MeiliSearch server, so why not keep both? Except if you think this is too much maintenance, let's remove the mock part then.
We've done the same in the Symfony bundler package: https://github.com/meilisearch/meilisearch-symfony/blob/c764bcdb45f83941bc10d3b461ded5cf8d7f86b7/.github/workflows/tests.yml#L29-L32
And in the meilisearch-php SDK repo: https://github.com/meilisearch/meilisearch-php/blob/master/.github/workflows/tests.yml
What do you think @shokme? (just your opinion, I'm not asking you if you have time to do it of course 😁)
And also everyone, what is your opinion on it?
I'm totally on your side on this @curquiza. Adding the meilisearch service in the CI tests would be a great addition.
At the same point we could split the tests to a structure like Unit
tests and Feature
tests. And let the current mocked tests live along.
My changes in #89 added the test coverage output which shows the parts that are untested at the moment. That part could be the start of the new Feature
tests
Ok, then let's do this! This would make our repo safer 💪
@curquiza can this be closed? what do you think
Yes sorry, the PR should have closed it automatically! 😇
Most helpful comment
I'm totally on your side on this @curquiza. Adding the meilisearch service in the CI tests would be a great addition.
At the same point we could split the tests to a structure like
Unit
tests andFeature
tests. And let the current mocked tests live along.My changes in #89 added the test coverage output which shows the parts that are untested at the moment. That part could be the start of the new
Feature
tests