integration

package
v0.0.0-...-e171dc0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// ConfigTestFile contains the path and filename of the config for integration tests
	ConfigTestFile = "../fixtures/config/config_test.yaml"
)

Variables

This section is empty.

Functions

func ExampleCCInitArgs

func ExampleCCInitArgs() [][]byte

ExampleCCInitArgs returns example cc initialization args

func ExampleCCQueryArgs

func ExampleCCQueryArgs() [][]byte

ExampleCCQueryArgs returns example cc query args

func ExampleCCTxArgs

func ExampleCCTxArgs() [][]byte

ExampleCCTxArgs returns example cc move funds args

func GenerateRandomID

func GenerateRandomID() string

GenerateRandomID generates random ID

func HasPrimaryPeerJoinedChannel

func HasPrimaryPeerJoinedChannel(client fab.FabricClient, channel fab.Channel) (bool, error)

HasPrimaryPeerJoinedChannel checks whether the primary peer of a channel has already joined the channel. It returns true if it has, false otherwise, or an error

Types

type BaseSetupImpl

type BaseSetupImpl struct {
	Client          fab.FabricClient
	Channel         fab.Channel
	EventHub        fab.EventHub
	ConnectEventHub bool
	ConfigFile      string
	OrgID           string
	ChannelID       string
	ChainCodeID     string
	Initialized     bool
	ChannelConfig   string
	AdminUser       ca.User
}

BaseSetupImpl implementation of BaseTestSetup

func (*BaseSetupImpl) CreateAndSendTransaction

func (setup *BaseSetupImpl) CreateAndSendTransaction(channel fab.Channel, resps []*apitxn.TransactionProposalResponse) (*apitxn.TransactionResponse, error)

CreateAndSendTransaction ...

func (*BaseSetupImpl) CreateAndSendTransactionProposal

func (setup *BaseSetupImpl) CreateAndSendTransactionProposal(channel fab.Channel, chainCodeID string,
	fcn string, args [][]byte, targets []apitxn.ProposalProcessor, transientData map[string][]byte) ([]*apitxn.TransactionProposalResponse, apitxn.TransactionID, error)

CreateAndSendTransactionProposal ... TODO duplicate

func (*BaseSetupImpl) GetChannel

func (setup *BaseSetupImpl) GetChannel(client fab.FabricClient, channelID string, orgs []string) (fab.Channel, error)

GetChannel initializes and returns a channel based on config

func (*BaseSetupImpl) GetDeployPath

func (setup *BaseSetupImpl) GetDeployPath() string

GetDeployPath ..

func (*BaseSetupImpl) InitConfig

func (setup *BaseSetupImpl) InitConfig() (apiconfig.Config, error)

InitConfig ...

func (*BaseSetupImpl) Initialize

func (setup *BaseSetupImpl) Initialize(t *testing.T) error

Initialize reads configuration from file and sets up client, channel and event hub

func (*BaseSetupImpl) InstallAndInstantiateExampleCC

func (setup *BaseSetupImpl) InstallAndInstantiateExampleCC() error

InstallAndInstantiateExampleCC ..

func (*BaseSetupImpl) InstallCC

func (setup *BaseSetupImpl) InstallCC(chainCodeID string, chainCodePath string, chainCodeVersion string, chaincodePackage []byte) error

InstallCC ...

func (*BaseSetupImpl) InstantiateCC

func (setup *BaseSetupImpl) InstantiateCC(chainCodeID string, chainCodePath string, chainCodeVersion string, args [][]byte) error

InstantiateCC ...

func (*BaseSetupImpl) RegisterTxEvent

func (setup *BaseSetupImpl) RegisterTxEvent(t *testing.T, txID apitxn.TransactionID, eventHub fab.EventHub) (chan bool, chan error)

RegisterTxEvent registers on the given eventhub for the give transaction returns a boolean channel which receives true when the event is complete and an error channel for errors TODO - Duplicate

func (*BaseSetupImpl) UpgradeCC

func (setup *BaseSetupImpl) UpgradeCC(chainCodeID string, chainCodePath string, chainCodeVersion string, args [][]byte) error

UpgradeCC ...

func (*BaseSetupImpl) UpgradeExampleCC

func (setup *BaseSetupImpl) UpgradeExampleCC() error

UpgradeExampleCC ..

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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