meilisearch-rust icon indicating copy to clipboard operation
meilisearch-rust copied to clipboard

Add tests for errors

Open curquiza opened this issue 3 years ago • 1 comments

Following this issue: https://github.com/meilisearch/meilisearch-rust/issues/159

Add tests to ensure that errors are parsed successfully

curquiza avatar Aug 11 '21 15:08 curquiza

Some tests were added but more should be added: https://github.com/meilisearch/meilisearch-rust/blob/dbd0c17301faa0683bc6e7460e5a696c76864dd9/src/errors.rs#L231

bidoubiwa avatar Sep 27 '22 15:09 bidoubiwa

Doesn't #356 close this? If not, what more is required?

romilpunetha avatar Oct 16 '22 20:10 romilpunetha

Hey @romilpunetha . Thanks for the interest :)

I just checked, there seems to be a lot of new tests. If you don't find any relevant test to add, we can close this issue :)

bidoubiwa avatar Oct 17 '22 09:10 bidoubiwa

I believe we can. The only two error attributes that do not have a test case are InvalidTenantToken and Yaup because they were particularly hard to test. However, they are not used anywhere in the codebase. For all the other attributes tests exist.

romilpunetha avatar Oct 17 '22 21:10 romilpunetha

They are thrown by the external libraries. If you manage to test them, you can open a PR :)

bidoubiwa avatar Oct 18 '22 11:10 bidoubiwa

@bidoubiwa Done.

romilpunetha avatar Oct 19 '22 17:10 romilpunetha