-
Notifications
You must be signed in to change notification settings - Fork 91
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
Improve the test macro #238
Comments
If the index already exists it should still be deleted as we cannot guarantee that the settings are the ones required for the next tests. To avoid this, we can always delete the index before creating one. |
Super cool, I think we can keep the issue open, though because deleting the index at the end of the tests is faster. We don't need to wait until the update is processed and can let meilisearch process his tasks. Also there was a second point in the issue 😁 |
Are you suggesting deleting the index only at the end of all the tests or at the end of every test?
Oh sorry, I thought it was linked! |
269: Delete index before creation in test macro r=bidoubiwa a=bidoubiwa Partial fixes of #238 Co-authored-by: Charlotte Vermandel <[email protected]> Co-authored-by: cvermand <[email protected]>
It is not a good thing to delete it after the test because if something happens before the test finishes, we will have an unwanted state. Since we are testing e2e we need to rely on the Meilisearch instance for everything, otherwise, we probably will end with a flaky test. Good reference about the subject: https://docs.cypress.io/guides/references/best-practices#Using-after-or-afterEach-hooks |
Oooh, interesting. Thanks for the insight! |
Related to "understand paths" is the related one for setting up the client like this one?: |
Currently, our test macro is missing two big features:
Index
if there was one and then output the panic normally to make the test failThe text was updated successfully, but these errors were encountered: