Commit ea49968
Merge #283
283: Improve the test-macro r=brunoocasali a=irevoire
Before this PR, the test macro was using the name of the function as the name of the index.
That caused a bug in our test suite because, at some point, we had two tests with the same name;
```
test indexes::tests::test_fetch_info ... ok
test client::tests::test_fetch_info ... ok
```
Now, this PR uses the whole path of the test instead of only the name of the function, but since
meilisearch doesn't allow `:` in the index name, it then proceeds to replace all the `::` with one
`-`. Thus for the previous examples the generated index name would be
```
indexes-tests-test_fetch_info
client-tests-test_fetch_info
```
That seems like a good solution since rust forbids having two functions with the same name in the
same module, and it's still easily readable in case we need to debug something in meilisearch from
the index name.
Co-authored-by: Irevoire <[email protected]>1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
93 | 96 | | |
94 | | - | |
| 97 | + | |
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
| |||
0 commit comments