Documentation ¶
Index ¶
- Constants
- func ExampleCCInitArgs() [][]byte
- func ExampleCCQueryArgs() [][]byte
- func ExampleCCTxArgs() [][]byte
- func GenerateRandomID() string
- func HasPrimaryPeerJoinedChannel(client fab.FabricClient, channel fab.Channel) (bool, error)
- type BaseSetupImpl
- func (setup *BaseSetupImpl) CreateAndSendTransaction(channel fab.Channel, resps []*apitxn.TransactionProposalResponse) (*apitxn.TransactionResponse, error)
- func (setup *BaseSetupImpl) CreateAndSendTransactionProposal(channel fab.Channel, chainCodeID string, fcn string, args [][]byte, ...) ([]*apitxn.TransactionProposalResponse, apitxn.TransactionID, error)
- func (setup *BaseSetupImpl) GetChannel(client fab.FabricClient, channelID string, orgs []string) (fab.Channel, error)
- func (setup *BaseSetupImpl) GetDeployPath() string
- func (setup *BaseSetupImpl) InitConfig() (apiconfig.Config, error)
- func (setup *BaseSetupImpl) Initialize(t *testing.T) error
- func (setup *BaseSetupImpl) InstallAndInstantiateExampleCC() error
- func (setup *BaseSetupImpl) InstallCC(chainCodeID string, chainCodePath string, chainCodeVersion string, ...) error
- func (setup *BaseSetupImpl) InstantiateCC(chainCodeID string, chainCodePath string, chainCodeVersion string, ...) error
- func (setup *BaseSetupImpl) RegisterTxEvent(t *testing.T, txID apitxn.TransactionID, eventHub fab.EventHub) (chan bool, chan error)
- func (setup *BaseSetupImpl) UpgradeCC(chainCodeID string, chainCodePath string, chainCodeVersion string, ...) error
- func (setup *BaseSetupImpl) UpgradeExampleCC() error
Constants ¶
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 HasPrimaryPeerJoinedChannel ¶
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 ..