mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +08:00
Related to #44761 #38339 This commit consolidates the proxy package's mockery generation to use a centralized `.mockery.yaml` configuration file, aligning with the pattern used by other packages like querycoordv2. Changes - **Makefile**: Replace multiple individual mockery commands with a single config-based invocation for `generate-mockery-proxy` target - **internal/proxy/.mockery.yaml**: Add mockery configuration defining all mock interfaces for proxy and proxy/shardclient packages - **Mock files**: Regenerate mocks using the new configuration: - `mock_cache.go`: Clean up by removing unused interface methods (credential, shard cache, policy methods) - `shardclient/mock_lb_balancer.go`: Update type comments (nodeInfo → NodeInfo) - `shardclient/mock_lb_policy.go`: Update formatting - `shardclient/mock_shardclient_manager.go`: Fix parameter naming consistency (nodeInfo1 → nodeInfo) - **task_search_test.go**: Remove obsolete mock expectations for deprecated cache methods Benefits - Centralized mockery configuration for easier maintenance - Consistent with other packages (querycoordv2, etc.) - Cleaner mock interfaces by removing unused methods - Better type consistency in generated mocks Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
32 lines
859 B
YAML
32 lines
859 B
YAML
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/proxy:
|
|
interfaces:
|
|
Cache:
|
|
timestampAllocatorInterface:
|
|
config:
|
|
mockname: mockTimestampAllocator
|
|
filename: mock_tso_test.go
|
|
channelsMgr:
|
|
config:
|
|
mockname: MockChannelsMgr
|
|
filename: mock_channels_manager.go
|
|
github.com/milvus-io/milvus/internal/proxy/shardclient:
|
|
interfaces:
|
|
LBPolicy:
|
|
config:
|
|
filename: mock_lb_policy.go
|
|
LBBalancer:
|
|
config:
|
|
filename: mock_lb_balancer.go
|
|
ShardClientMgr:
|
|
config:
|
|
filename: mock_shardclient_manager.go
|
|
mockname: MockShardClientManager
|