meilisearch / meilisearch/meilisearch-php
Remove all keys before running tests
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 757
- Forks
- 125
- Avg merge
- 6d 8h
- Merged PRs (30d)
- 2
Description
Currently, in the tests (especially KeysAndPermissionsTest.php) we manually remove the created keys using $this->client->deleteKey. This is good, but we can do better.
The idea of this issue is to create a way of doing that for every test. We can use setUp() hook for that.
This will probably break some tests where we rely on the default keys created by Meilisearch automatically, those tests now should set up their own keys before asserting on them.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with KeysAndPermissionsTest.php and its existing $this->client->deleteKey cleanup, then inspect the shared test setup and setUp() hooks. Run the full test suite; done means tests consistently remove created keys through the shared setup while tests depending on Meilisearch's default keys create their own keys before assertions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100