test

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2022 License: MulanPSL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertProtoEqual

func AssertProtoEqual(t *testing.T, expected protoiface.MessageV1, actual protoiface.MessageV1)

AssertProtoEqual ensures an expected protobuf message matches an actual message

func AssertUnmarshal

func AssertUnmarshal(t *testing.T, b []byte, m protoiface.MessageV1)

AssertUnmarshal ensures that a protobuf is umarshaled without error

func AssertUnmarshalChannelheader

func AssertUnmarshalChannelheader(t *testing.T, proposedTransaction *peer.SignedProposal) *common.ChannelHeader

AssertUnmarshalChannelheader ensures that a ChannelHeader protobuf is umarshalled without error

func AssertUnmarshalHeader

func AssertUnmarshalHeader(t *testing.T, proposedTransaction *peer.SignedProposal) *common.Header

AssertUnmarshalHeader ensures that a Header protobuf is umarshalled without error

func AssertUnmarshalInvocationSpec

func AssertUnmarshalInvocationSpec(t *testing.T, proposedTransaction *peer.SignedProposal) *peer.ChaincodeInvocationSpec

AssertUnmarshalInvocationSpec ensures that a ChaincodeInvocationSpec protobuf is umarshalled without error

func AssertUnmarshalProposalPayload

func AssertUnmarshalProposalPayload(t *testing.T, proposedTransaction *peer.SignedProposal) *peer.ChaincodeProposalPayload

AssertUnmarshalProposalPayload ensures that a ChaincodeProposalPayload protobuf is umarshalled without error

func AssertUnmarshalSignatureHeader

func AssertUnmarshalSignatureHeader(t *testing.T, proposedTransaction *peer.SignedProposal) *common.SignatureHeader

AssertUnmarshalSignatureHeader ensures that a SignatureHeader protobuf is umarshalled without error

func NewCertificate

func NewCertificate(privateKey crypto.PrivateKey) (*x509.Certificate, error)

NewCertificate generates a new certificate from a private key for testing

func NewSM2PrivateKey

func NewSM2PrivateKey() (*sm2.PrivateKey, error)

NewSM2PrivateKey generates a new private key for testing

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL