test

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertProtoEqual added in v1.1.0

func AssertProtoEqual(t *testing.T, expected protoreflect.ProtoMessage, actual protoreflect.ProtoMessage)

AssertProtoEqual ensures an expected protobuf message matches an actual message

func AssertUnmarshal added in v1.1.0

func AssertUnmarshal(t *testing.T, b []byte, m protoreflect.ProtoMessage)

AssertUnmarshal ensures that a protobuf is umarshaled without error

func AssertUnmarshalChannelheader added in v1.1.0

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

AssertUnmarshalChannelheader ensures that a ChannelHeader protobuf is umarshalled without error

func AssertUnmarshalHeader added in v1.1.0

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

AssertUnmarshalHeader ensures that a Header protobuf is umarshalled without error

func AssertUnmarshalInvocationSpec added in v1.1.0

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

AssertUnmarshalInvocationSpec ensures that a ChaincodeInvocationSpec protobuf is umarshalled without error

func AssertUnmarshalProposalPayload added in v1.1.0

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

AssertUnmarshalProposalPayload ensures that a ChaincodeProposalPayload protobuf is umarshalled without error

func AssertUnmarshalSignatureHeader added in v1.1.0

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 NewECDSAPrivateKey

func NewECDSAPrivateKey() (*ecdsa.PrivateKey, error)

NewECDSAPrivateKey generates a new private key for testing

func NewEd25519KeyPair added in v1.3.0

func NewEd25519KeyPair() (ed25519.PublicKey, ed25519.PrivateKey, error)

NewEd25519KeyPair generates a new public and private key pair 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