bddtests

package
v1.0.0-preview Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2017 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FeatureContextBootstrap

func FeatureContextBootstrap(bddCtx *BDDContext, s *godog.Suite)

FeatureContextBootstrap setup the FeatureContext for bootstrap steps

func NewGrpcClient

func NewGrpcClient(peerAddress string) (*grpc.ClientConn, error)

NewGrpcClient return a new GRPC client connection for the specified peer address

Types

type BDDContext

type BDDContext struct {
	// contains filtered or unexported fields
}

BDDContext represents the current context for the executing scenario. Commensurate concept of 'context' from behave testing.

func (*BDDContext) GetArgsForUser

func (b *BDDContext) GetArgsForUser(cells []*gherkin.TableCell, userRegistration *UserRegistration) (args []string, err error)

GetArgsForUser will return an arg slice of string allowing for replacement of parameterized values based upon tags for userRegistration

func (*BDDContext) GetUserRegistration

func (b *BDDContext) GetUserRegistration(enrollID string) (*UserRegistration, error)

GetUserRegistration return the UserRegistration for a given enrollID

type Composition

type Composition struct {
	// contains filtered or unexported fields
}

Composition represents a docker-compose execution and management

func NewComposition

func NewComposition(projectName string, composeFilesYaml string) (composition *Composition, err error)

NewComposition create a new Composition specifying the project name (for isolation) and the compose files.

func (*Composition) Decompose

func (c *Composition) Decompose() (output string, err error)

Decompose decompose the composition. Will also remove any containers with the same projectName prefix (eg. chaincode containers)

func (*Composition) GetAPIContainerForComposeService

func (c *Composition) GetAPIContainerForComposeService(composeService string) (apiContainer *docker.APIContainers, err error)

GetAPIContainerForComposeService return the docker.APIContainers with the supplied composeService name.

func (*Composition) GetContainerIDs

func (c *Composition) GetContainerIDs() (containerIDs []string, err error)

GetContainerIDs returns the container IDs for the composition (NOTE: does NOT include those defined outside composition, eg. chaincode containers)

func (*Composition) GetIPAddressForComposeService

func (c *Composition) GetIPAddressForComposeService(composeService string) (ipAddress string, err error)

GetIPAddressForComposeService returns the IPAddress of the container with the supplied composeService name.

type DockerHelper

type DockerHelper interface {
	GetIPAddress(containerID string) (string, error)
	RemoveContainersWithNamePrefix(namePrefix string) error
}

DockerHelper helper for docker specific functions

func NewDockerCmdlineHelper

func NewDockerCmdlineHelper() (DockerHelper, error)

NewDockerCmdlineHelper returns a new command line DockerHelper instance

type KeyedProposalResponse

type KeyedProposalResponse struct {
	// contains filtered or unexported fields
}

KeyedProposalResponse the response for an endorsement for internal usage in maps

type KeyedProposalResponseMap

type KeyedProposalResponseMap map[string]*KeyedProposalResponse

KeyedProposalResponseMap map of composeServices to KeyedProposalResponse

type UserRegistration

type UserRegistration struct {
	// contains filtered or unexported fields
}

UserRegistration represents a user in the peer network

func (*UserRegistration) GetChaincodeDeploymentSpec

func (u *UserRegistration) GetChaincodeDeploymentSpec(tagName string) (spec *pb.ChaincodeDeploymentSpec, err error)

GetChaincodeDeploymentSpec returns a ChaincodeDeploymentSpec for the supplied tag name (uses type assertion). Fails if not of expected type.

func (*UserRegistration) GetChaincodeSpec

func (u *UserRegistration) GetChaincodeSpec(tagName string) (ccSpec *pb.ChaincodeSpec, err error)

GetChaincodeSpec returns a chaincode spec for the supplied tag name (uses type assertion). Fails if not of expected type.

func (*UserRegistration) GetKeyedProposalResponseDict

func (u *UserRegistration) GetKeyedProposalResponseDict(tagName string) (result KeyedProposalResponseMap, err error)

GetKeyedProposalResponseDict returns a KeyedProposalResponseMap for the supplied tag name (uses type assertion). Fails if not of expected type.

func (*UserRegistration) GetProposal

func (u *UserRegistration) GetProposal(tagName string) (result *pb.Proposal, err error)

GetProposal returns a Proposal for the supplied tag name (uses type assertion). Fails if not of expected type.

func (*UserRegistration) GetTagValue

func (u *UserRegistration) GetTagValue(tagName string) (interface{}, error)

GetTagValue returns a tag value for the user given the supplied tag name

func (*UserRegistration) SetTagValue

func (u *UserRegistration) SetTagValue(tagName string, tagValue interface{}) (interface{}, error)

SetTagValue sets the tag value for the user given the supplied tag name. Fails if tag name already used.

Jump to

Keyboard shortcuts

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