-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use custom gomega matcher for protobuf equality (#4966)
The standard gomega Equal matcher is not reliable when used with protobuf messages since they can be logically equal while containing different implementation field values. This change implements a custom ProtoEqual matcher that uses proto.Equal for reliable equality checks. A failed match produces output similar to the following: ``` [FAILED] Expected ChaincodeMessage{ type: TRANSACTION payload: "\n\x04arg1\n\x04arg2" txid: "tx-id" proposal: { proposal_bytes: "signed-proposal-bytes" signature: "signature" } channel_id: "channel-id" } to equal SignedProposal{ proposal_bytes: "signed-proposal-bytes" signature: "signature" } ``` Signed-off-by: Mark S. Lewis <Mark.S.Lewis@outlook.com>
- Loading branch information
1 parent
bbf2300
commit 08df37e
Showing
21 changed files
with
311 additions
and
239 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
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.