mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-01 19:39:21 +08:00
Update CONTRIBUTING.md for mockery generation (#26842)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
fb0705df1b
commit
901e98a868
@ -192,6 +192,26 @@ $ go test ./internal/datanode -run SegmentReplica/segmentFlushed
|
||||
ok github.com/milvus-io/milvus/internal/datanode 0.019s
|
||||
```
|
||||
|
||||
### Using mockery
|
||||
|
||||
It is recommended to use [Mockery](https://github.com/vektra/mockery) to generate mock implementations for unit test dependencies.
|
||||
|
||||
If your PR changes any interface definition, you shall run following commands to update all mockery implemented type before submitting it:
|
||||
|
||||
```shell
|
||||
make generate-mockery
|
||||
```
|
||||
|
||||
If your PR adds any new interface and related mockery types, please add a new entry under proper [Makefile](Makefile) `generate-mockery-xxx` command.
|
||||
|
||||
```Makefile
|
||||
generate-mockery-xxx: getdeps
|
||||
# ...
|
||||
# other mockery generation commands
|
||||
# use mockery under $(INSTALL_PATH) to unify mockery binary version
|
||||
$(INSTALL_PATH)/mockery --name=NewInterface ...
|
||||
```
|
||||
|
||||
### Run C++ unit tests
|
||||
|
||||
Install lcov
|
||||
|
Loading…
Reference in New Issue
Block a user