Documentation
¶
Index ¶
- Constants
- Variables
- func ReplaceTemplate(topologies []api.Topology) []api.Topology
- type Configuration
- type Infrastructure
- func Clients(dir string, topologies ...api.Topology) (*Infrastructure, error)
- func Generate(startPort int, race bool, topologies ...api.Topology) (*Infrastructure, error)
- func GenerateAt(startPort int, path string, race bool, topologies ...api.Topology) (*Infrastructure, error)
- func Load(startPort int, dir string, race bool, topologies ...api.Topology) (*Infrastructure, error)
- func New(startPort int, path string, topologies ...api.Topology) (*Infrastructure, error)
- func (i *Infrastructure) CLI(name string) api.ViewClient
- func (i *Infrastructure) Client(name string) api.GRPCClient
- func (i *Infrastructure) EnableRaceDetector()
- func (i *Infrastructure) Generate()
- func (i *Infrastructure) Identity(name string) view.Identity
- func (i *Infrastructure) InitClients()
- func (i *Infrastructure) Load()
- func (i *Infrastructure) RegisterPlatformFactory(factory api.PlatformFactory)
- func (i *Infrastructure) Serve() error
- func (i *Infrastructure) Start()
- func (i *Infrastructure) StartFSCNode(id string)
- func (i *Infrastructure) Stop()
- func (i *Infrastructure) StopFSCNode(id string)
- func (i *Infrastructure) ViewCmd(node *smartclient.Replica) commands.View
- func (i *Infrastructure) WebClient(name string) api.WebClient
- type ReplicationOptions
- type TestPortRange
- type TestSuite
Constants ¶
View Source
const (
PortsPerSuite = 10 * portsPerNode
)
Variables ¶
View Source
var NoReplication = &ReplicationOptions{}
Functions ¶
Types ¶
type Configuration ¶
type Configuration struct {
StartPort int
}
type Infrastructure ¶
type Infrastructure struct { TestDir string StartPort int Ctx *context.Context NWO *nwo.NWO BuildServer *common.BuildServer DeleteOnStop bool DeleteOnStart bool PlatformFactories map[string]api.PlatformFactory Topologies []api.Topology FscPlatform *fsc.Platform }
func Clients ¶
func Clients(dir string, topologies ...api.Topology) (*Infrastructure, error)
Clients instantiate a new test integration infrastructure to access view client and CLI
func GenerateAt ¶
func (*Infrastructure) CLI ¶
func (i *Infrastructure) CLI(name string) api.ViewClient
func (*Infrastructure) Client ¶
func (i *Infrastructure) Client(name string) api.GRPCClient
func (*Infrastructure) EnableRaceDetector ¶
func (i *Infrastructure) EnableRaceDetector()
func (*Infrastructure) Generate ¶
func (i *Infrastructure) Generate()
func (*Infrastructure) InitClients ¶
func (i *Infrastructure) InitClients()
func (*Infrastructure) Load ¶
func (i *Infrastructure) Load()
func (*Infrastructure) RegisterPlatformFactory ¶
func (i *Infrastructure) RegisterPlatformFactory(factory api.PlatformFactory)
func (*Infrastructure) Serve ¶
func (i *Infrastructure) Serve() error
func (*Infrastructure) Start ¶
func (i *Infrastructure) Start()
func (*Infrastructure) StartFSCNode ¶
func (i *Infrastructure) StartFSCNode(id string)
func (*Infrastructure) Stop ¶
func (i *Infrastructure) Stop()
func (*Infrastructure) StopFSCNode ¶
func (i *Infrastructure) StopFSCNode(id string)
func (*Infrastructure) ViewCmd ¶
func (i *Infrastructure) ViewCmd(node *smartclient.Replica) commands.View
type ReplicationOptions ¶ added in v0.4.0
type ReplicationOptions struct { ReplicationFactors map[string]int SQLConfigs map[string]*postgres.ContainerConfig }
type TestPortRange ¶
type TestPortRange int
TestPortRange represents a port range
const ( BasePort TestPortRange = basePort + PortsPerSuite*iota PingPongPort PingPong2Port PingPongWithAdminPort IOUPort IOUHSMPort IOUWithOrionBackendPort AssetTransferSecuredAgreementWithChaincode AssetTransferSecuredAgreementWithApprovers AssetTransferEventsAgreementWithChaincode TwoFabricNetworksPort TwoFabricNetworksWithWeaverRelayPort FabricStopRestart PingPongOrion )
func (TestPortRange) StartPortForNode ¶
func (t TestPortRange) StartPortForNode() int
StartPortForNode On linux, the default ephemeral port range is 32768-60999 and can be allocated by the system for the client side of TCP connections or when programs explicitly request one. Given linux is our default CI system, we want to try avoid ports in that range.
type TestSuite ¶ added in v0.4.0
type TestSuite struct { II *Infrastructure // contains filtered or unexported fields }
func NewTestSuite ¶ added in v0.4.0
func NewTestSuite(generator func() (*Infrastructure, error)) *TestSuite
func NewTestSuiteWithSQL ¶ added in v0.4.0
func NewTestSuiteWithSQL(sqlConfigs map[string]*postgres.ContainerConfig, generator func() (*Infrastructure, error)) *TestSuite
Click to show internal directories.
Click to hide internal directories.