mirror of https://github.com/milvus-io/milvus.git
enhance: Add mockery package config for QC&QN (#38340)
Related to #38339 Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/38350/head
parent
856e2aad7d
commit
7ea9c983d2
22
Makefile
22
Makefile
|
@ -463,23 +463,13 @@ generate-mockery-proxy: getdeps
|
|||
$(INSTALL_PATH)/mockery --name=channelsMgr --dir=$(PWD)/internal/proxy --output=$(PWD)/internal/proxy --filename=mock_channels_manager.go --structname=MockChannelsMgr --with-expecter --outpkg=proxy --inpackage
|
||||
|
||||
generate-mockery-querycoord: getdeps
|
||||
$(INSTALL_PATH)/mockery --name=QueryNodeServer --dir=$(PWD)/internal/proto/querypb/ --output=$(PWD)/internal/querycoordv2/mocks --filename=mock_querynode.go --with-expecter --structname=MockQueryNodeServer
|
||||
$(INSTALL_PATH)/mockery --name=Broker --dir=$(PWD)/internal/querycoordv2/meta --output=$(PWD)/internal/querycoordv2/meta --filename=mock_broker.go --with-expecter --structname=MockBroker --outpkg=meta
|
||||
$(INSTALL_PATH)/mockery --name=TargetManagerInterface --dir=$(PWD)/internal/querycoordv2/meta --output=$(PWD)/internal/querycoordv2/meta --filename=mock_target_manager.go --with-expecter --structname=MockTargetManager --inpackage
|
||||
$(INSTALL_PATH)/mockery --name=Scheduler --dir=$(PWD)/internal/querycoordv2/task --output=$(PWD)/internal/querycoordv2/task --filename=mock_scheduler.go --with-expecter --structname=MockScheduler --outpkg=task --inpackage
|
||||
$(INSTALL_PATH)/mockery --name=Cluster --dir=$(PWD)/internal/querycoordv2/session --output=$(PWD)/internal/querycoordv2/session --filename=mock_cluster.go --with-expecter --structname=MockCluster --outpkg=session --inpackage
|
||||
$(INSTALL_PATH)/mockery --name=Balance --dir=$(PWD)/internal/querycoordv2/balance --output=$(PWD)/internal/querycoordv2/balance --filename=mock_balancer.go --with-expecter --structname=MockBalancer --outpkg=balance --inpackage
|
||||
$(INSTALL_PATH)/mockery --name=Controller --dir=$(PWD)/internal/querycoordv2/dist --output=$(PWD)/internal/querycoordv2/dist --filename=mock_controller.go --with-expecter --structname=MockController --outpkg=dist --inpackage
|
||||
$(INSTALL_PATH)/mockery --config $(PWD)/internal/querycoordv2/.mockery.yaml
|
||||
|
||||
generate-mockery-querynode: getdeps build-cpp
|
||||
@source $(PWD)/scripts/setenv.sh # setup PKG_CONFIG_PATH
|
||||
$(INSTALL_PATH)/mockery --name=Manager --dir=$(PWD)/internal/querynodev2/cluster --output=$(PWD)/internal/querynodev2/cluster --filename=mock_manager.go --with-expecter --outpkg=cluster --structname=MockManager --inpackage
|
||||
$(INSTALL_PATH)/mockery --name=SegmentManager --dir=$(PWD)/internal/querynodev2/segments --output=$(PWD)/internal/querynodev2/segments --filename=mock_segment_manager.go --with-expecter --outpkg=segments --structname=MockSegmentManager --inpackage
|
||||
$(INSTALL_PATH)/mockery --name=CollectionManager --dir=$(PWD)/internal/querynodev2/segments --output=$(PWD)/internal/querynodev2/segments --filename=mock_collection_manager.go --with-expecter --outpkg=segments --structname=MockCollectionManager --inpackage
|
||||
$(INSTALL_PATH)/mockery --name=Loader --dir=$(PWD)/internal/querynodev2/segments --output=$(PWD)/internal/querynodev2/segments --filename=mock_loader.go --with-expecter --outpkg=segments --structname=MockLoader --inpackage
|
||||
$(INSTALL_PATH)/mockery --name=Segment --dir=$(PWD)/internal/querynodev2/segments --output=$(PWD)/internal/querynodev2/segments --filename=mock_segment.go --with-expecter --outpkg=segments --structname=MockSegment --inpackage
|
||||
$(INSTALL_PATH)/mockery --name=Worker --dir=$(PWD)/internal/querynodev2/cluster --output=$(PWD)/internal/querynodev2/cluster --filename=mock_worker.go --with-expecter --outpkg=worker --structname=MockWorker --inpackage
|
||||
$(INSTALL_PATH)/mockery --name=ShardDelegator --dir=$(PWD)/internal/querynodev2/delegator/ --output=$(PWD)/internal/querynodev2/delegator/ --filename=mock_delegator.go --with-expecter --outpkg=delegator --structname=MockShardDelegator --inpackage
|
||||
generate-mockery-querynode-without-cpp:
|
||||
@source $(PWD)/scripts/setenv.sh
|
||||
$(INSTALL_PATH)/mockery --config $(PWD)/internal/querynodev2/.mockery.yaml
|
||||
|
||||
generate-mockery-querynode: build-cpp generate-mockery-querynode-without-cpp
|
||||
|
||||
generate-mockery-datacoord: getdeps
|
||||
$(INSTALL_PATH)/mockery --name=compactionPlanContext --dir=internal/datacoord --filename=mock_compaction_plan_context.go --output=internal/datacoord --structname=MockCompactionPlanContext --with-expecter --inpackage
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
quiet: False
|
||||
with-expecter: True
|
||||
inpackage: True
|
||||
filename: "mock_{{.InterfaceNameSnake}}.go"
|
||||
mockname: "Mock{{.InterfaceName}}"
|
||||
outpkg: "{{.PackageName}}"
|
||||
dir: "{{.InterfaceDir}}"
|
||||
packages:
|
||||
github.com/milvus-io/milvus/internal/querycoordv2/balance:
|
||||
interfaces:
|
||||
Balance:
|
||||
config:
|
||||
filename: "mock_balancer.go"
|
||||
mockname: "MockBalancer"
|
||||
github.com/milvus-io/milvus/internal/querycoordv2/dist:
|
||||
interfaces:
|
||||
Controller:
|
||||
github.com/milvus-io/milvus/internal/querycoordv2/meta:
|
||||
interfaces:
|
||||
Broker:
|
||||
TargetManagerInterface:
|
||||
config:
|
||||
filename: "mock_target_manager.go"
|
||||
mockname: "MockTargetManager"
|
||||
github.com/milvus-io/milvus/internal/querycoordv2/session:
|
||||
interfaces:
|
||||
Cluster:
|
||||
github.com/milvus-io/milvus/internal/querycoordv2/task:
|
||||
interfaces:
|
||||
Scheduler:
|
||||
github.com/milvus-io/milvus/internal/proto/querypb:
|
||||
interfaces:
|
||||
QueryNodeServer:
|
||||
config:
|
||||
dir: "internal/querycoordv2/mocks"
|
||||
inpackage: False
|
||||
outpkg: "mocks"
|
||||
filename: "mock_querynode.go"
|
||||
mockname: "MockQueryNodeServer"
|
|
@ -0,0 +1,23 @@
|
|||
quiet: False
|
||||
with-expecter: True
|
||||
inpackage: True
|
||||
filename: "mock_{{.InterfaceNameSnake}}.go"
|
||||
mockname: "Mock{{.InterfaceName}}"
|
||||
outpkg: "{{.PackageName}}"
|
||||
dir: "{{.InterfaceDir}}"
|
||||
packages:
|
||||
github.com/milvus-io/milvus/internal/querynodev2/cluster:
|
||||
interfaces:
|
||||
Manager:
|
||||
Worker:
|
||||
github.com/milvus-io/milvus/internal/querynodev2/segments:
|
||||
interfaces:
|
||||
SegmentManager:
|
||||
CollectionManager:
|
||||
Loader:
|
||||
Segment:
|
||||
github.com/milvus-io/milvus/internal/querynodev2/delegator:
|
||||
interfaces:
|
||||
ShardDelegator:
|
||||
config:
|
||||
filename: "mock_delegator.go"
|
Loading…
Reference in New Issue