Documentation ¶
Index ¶
- Constants
- Variables
- func CleanupTestPath(t *testing.T, storePath string)
- func CleanupUserData(t *testing.T, sdk *fabsdk.FabricSDK)
- func CreateChannel(sdk *fabsdk.FabricSDK, req resmgmt.SaveChannelRequest) (bool, error)
- func ExampleCCInitArgs() [][]byte
- func ExampleCCQueryArgs() [][]byte
- func ExampleCCTxArgs() [][]byte
- func ExampleCCUpgradeArgs() [][]byte
- func FilterTargetsJoinedChannel(sdk *fabsdk.FabricSDK, orgID string, channelID string, targets []string) ([]string, error)
- func GenerateRandomID() string
- func GetDeployPath() string
- func GetSigningIdentity(sdk *fabsdk.FabricSDK, user, orgID string) (msp.SigningIdentity, error)
- func HasPeerJoinedChannel(client *resmgmt.Client, target string, channel string) (bool, error)
- func InitializeChannel(sdk *fabsdk.FabricSDK, orgID string, req resmgmt.SaveChannelRequest, ...) error
- func InstallAndInstantiateCC(sdk *fabsdk.FabricSDK, user fabsdk.ContextOption, orgName string, ...) error
- func InstallAndInstantiateExampleCC(sdk *fabsdk.FabricSDK, user fabsdk.ContextOption, orgName string, ...) error
- func JoinChannel(sdk *fabsdk.FabricSDK, name, orgID string) (bool, error)
- func OrgTargetPeers(config core.Config, orgs []string) ([]string, error)
- type BaseSetupImpl
Constants ¶
const ( ExampleCCInitB = "200" ExampleCCUpgradeB = "400" AdminUser = "Admin" )
Initial B values for ExampleCC
Variables ¶
var ConfigChBlockTestFile = "../fixtures/config/" + configFileNoOrderer
ConfigChBlockTestFile the path and filename of the config for integration tests in which orderer config is not provided
var ConfigTestFile = "../fixtures/config/" + configFile
ConfigTestFile contains the path and filename of the config for integration tests
Functions ¶
func CleanupTestPath ¶
CleanupTestPath removes the contents of a state store.
func CleanupUserData ¶
CleanupUserData removes user data.
func CreateChannel ¶
CreateChannel attempts to save the named channel.
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 ExampleCCUpgradeArgs ¶
func ExampleCCUpgradeArgs() [][]byte
ExampleCCUpgradeArgs returns example cc upgrade args
func FilterTargetsJoinedChannel ¶
func FilterTargetsJoinedChannel(sdk *fabsdk.FabricSDK, orgID string, channelID string, targets []string) ([]string, error)
FilterTargetsJoinedChannel filters targets to those that have joined the named channel.
func GetSigningIdentity ¶
GetSigningIdentity returns signing identity TODO : not a recommended way to get idenity, will be replaced
func HasPeerJoinedChannel ¶
HasPeerJoinedChannel checks whether the peer has already joined the channel. It returns true if it has, false otherwise, or an error
func InitializeChannel ¶
func InitializeChannel(sdk *fabsdk.FabricSDK, orgID string, req resmgmt.SaveChannelRequest, targets []string) error
InitializeChannel ...
func InstallAndInstantiateCC ¶
func InstallAndInstantiateCC(sdk *fabsdk.FabricSDK, user fabsdk.ContextOption, orgName string, ccName, ccPath, ccVersion, goPath string, ccArgs [][]byte) error
InstallAndInstantiateCC install and instantiate using resource management client
func InstallAndInstantiateExampleCC ¶
func InstallAndInstantiateExampleCC(sdk *fabsdk.FabricSDK, user fabsdk.ContextOption, orgName string, chainCodeID string) error
InstallAndInstantiateExampleCC install and instantiate using resource management client
func JoinChannel ¶
JoinChannel attempts to save the named channel.
Types ¶
type BaseSetupImpl ¶
type BaseSetupImpl struct { Identity msp.Identity Targets []string ConfigFile string OrgID string ChannelID string ChannelConfigFile string }
BaseSetupImpl implementation of BaseTestSetup
func (*BaseSetupImpl) InitConfig ¶
func (setup *BaseSetupImpl) InitConfig() core.ConfigProvider
InitConfig ...
func (*BaseSetupImpl) Initialize ¶
func (setup *BaseSetupImpl) Initialize(sdk *fabsdk.FabricSDK) error
Initialize reads configuration from file and sets up client, channel and event hub