-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New version of fabric-protos uses updated protoc and protobuf versions, including protobuf-java v4. This change updates from protobuf-java v3 to v4. The change to use generics in the newer generated gRPC client stubs means that the previous approach of mocking them using uber-go/mock is not possible. This change uses mockery to mock the gRPC client connection instead. Mockery does support mocking of most generics, and mocking at the connection allows unit testing to be done using the public API without test hooks to allow replacement of gRPC stubs. Signed-off-by: Mark S. Lewis <[email protected]>
- Loading branch information
1 parent
050e807
commit 4a82a77
Showing
21 changed files
with
2,077 additions
and
2,518 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ linters: | |
- govet | ||
- ineffassign | ||
- misspell | ||
- testifylint | ||
- typecheck | ||
- unused | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
with-expecter: true | ||
exported: true | ||
filename: "{{.InterfaceName | lower}}_mock_test.go" | ||
mockname: "Mock{{.InterfaceName | firstUpper}}" | ||
unroll-variadic: false | ||
packages: | ||
google.golang.org/grpc: | ||
config: | ||
dir: pkg/client | ||
outpkg: client | ||
interfaces: | ||
ClientConnInterface: | ||
ClientStream: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.