helpers

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertImagesExist

func AssertImagesExist(imageNames ...string)

func CheckConfigContainsExpectedConfig

func CheckConfigContainsExpectedConfig(expectedConfig discovery.ConfigResult, actualConfig discovery.ConfigResult) bool

Verifies that discovery service expectedConfig can be found in actualConfig. The check is done by comparing orderers (name, host and port) and by comparing msps(only name)

func CheckEndorsementContainsExpectedEndorsement

func CheckEndorsementContainsExpectedEndorsement(expectedEndorsement EndorsementDescriptor, actualEndorsement EndorsementDescriptor) bool

Verifies that actualEndorsement contains expectedEndorsement. The check is done by comparing the following fields: - Chaincode - identical in both endorsement descriptors - EndorsersByGroups - each group of DiscoveredPeer in expectedEndorsement can be found also in actualEndorsement. different calls to discovery service might generate different groups names - Layouts - all layouts that exist in expectedEndorsement can be found also in actualEndorsement. the function takes care of different names also in this check

func CheckPeersContainsExpectedPeers

func CheckPeersContainsExpectedPeers(expectedPeers []DiscoveredPeer, actualPeers []DiscoveredPeer) bool

Verifies that each DiscveredPeer in expectedPeers exist in actualPeers. The check is done by comparing peer endpoint and mspid and ignores ledger height, identity and chaincodes.

func Contains

func Contains(list []string, value string) bool

func CopyFile

func CopyFile(src, dest string)

func Execute

func Execute(r ifrit.Runner) (err error)

func StartSession

func StartSession(cmd *exec.Cmd, name, ansiColorCode string) (*gexec.Session, error)

func UniqueName

func UniqueName() string

UniqueName generates base-32 enocded UUIDs for container names.

Types

type DiscoveredPeer

type DiscoveredPeer struct {
	MSPID        string
	LedgerHeight uint64
	Endpoint     string
	Identity     string
	Chaincodes   []string
}

type EndorsementDescriptor

type EndorsementDescriptor struct {
	Chaincode         string
	EndorsersByGroups map[string][]DiscoveredPeer
	Layouts           []*discovery.Layout
}

Jump to

Keyboard shortcuts

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