Skip to content

Commit efb4643

Browse files
committed
[FAB-15267] Refactor PluginFactory mock in committer
Refactored PluginFactory mock in core/committer/txvalidator /v14 to generate from local interface. Change-Id: Id05b0d1abe9b7bb4787d7dbcf1b47893b92af779 Signed-off-by: Chongxin Luo <Chongxin.Luo@ibm.com>
1 parent 2da3243 commit efb4643

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

core/committer/txvalidator/v14/mocks/plugin_factory.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/committer/txvalidator/v14/plugin_validator.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ type Mapper interface {
3131
vp.Mapper
3232
}
3333

34-
//go:generate mockery -dir ../../../handlers/validation/api/ -name PluginFactory -case underscore -output mocks/
34+
//go:generate mockery -dir . -name PluginFactory -case underscore -output mocks/
35+
36+
// PluginFactory local interface used to generate mock for foreign interface.
37+
type PluginFactory interface {
38+
validation.PluginFactory
39+
}
40+
3541
//go:generate mockery -dir ../../../handlers/validation/api/ -name Plugin -case underscore -output mocks/
3642
//go:generate mockery -dir . -name QueryExecutorCreator -case underscore -output mocks/
3743

0 commit comments

Comments
 (0)