Commit 6c571b2
committed
Improve the test-macro
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 use 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 `::` by 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.1 parent 2efb5c7 commit 6c571b2
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