Skip to content

Commit

Permalink
bft chain unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Emil Elizarov <emil.elizarov@ibm.com>
  • Loading branch information
Emil Elizarov committed Jul 19, 2023
1 parent 628d059 commit 4a42ed1
Show file tree
Hide file tree
Showing 31 changed files with 2,688 additions and 296 deletions.
143 changes: 143 additions & 0 deletions common/policies/policies_mocks/manager.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

121 changes: 121 additions & 0 deletions common/policies/policies_mocks/policy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions common/policies/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ type Converter interface {
Convert() (*cb.SignaturePolicyEnvelope, error)
}

//go:generate mockery --dir . --name Policy --case underscore --with-expecter=true --output policies_mocks

// Policy is used to determine if a signature is valid
type Policy interface {
// EvaluateSignedData takes a set of SignedData and evaluates whether
Expand All @@ -146,6 +148,8 @@ type InquireablePolicy interface {
SatisfiedBy() []PrincipalSet
}

//go:generate mockery --dir . --name Manager --case underscore --with-expecter=true --output policies_mocks

// Manager is a read only subset of the policy ManagerImpl
type Manager interface {
// GetPolicy returns a policy and true if it was the policy requested, or false if it is the default policy
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/cluster/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/hyperledger/fabric-protos-go/orderer"
)

//go:generate mockery --dir . --name Communicator --case underscore --output ./mocks/
//go:generate mockery --dir . --name Communicator --case underscore --with-expecter=true --output ./mocks/

// Communicator defines communication for a consenter
type Communicator interface {
Expand Down
Loading

0 comments on commit 4a42ed1

Please sign in to comment.