e2e

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WidgetSchemaJSON = []byte(`{
	"$id": "https://example.com/widget.schema.json",
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"title": "Widget",
	"type": "object",
	"properties": {
		"id": {
			"type": "string",
			"description": "The unique identifier for the widget."
		},
		"name": {
			"type": "string",
			"description": "The person's last name."
		}
	},
	"additionalProperties": false
}`)

Functions

func AddNamespace added in v1.1.0

func AddNamespace(data map[string]interface{}, ns map[string]interface{})

func AddPluginBroadcastName added in v1.1.0

func AddPluginBroadcastName(data map[string]interface{}, pluginType, broadcastName string)

func ChangeDefaultNSPluginLocalName added in v1.1.0

func ChangeDefaultNSPluginLocalName(data map[string]interface{}, pluginType, newLocalName string)

ChangeDefaultNSPluginLocalName changes the plugin local name and updates the plugin list for the default namespace

func GetMemberHostname

func GetMemberHostname(filename string, n int) (string, error)

func GetMemberPort

func GetMemberPort(filename string, n int) (int, error)

func PickTopic added in v1.1.0

func PickTopic(i int, options []string) string

func PollForUp added in v1.1.0

func PollForUp(t *testing.T, client *client.FireFlyClient)

func RandomName added in v1.1.0

func RandomName(t *testing.T) string

func ReadConfig added in v1.1.0

func ReadConfig(t *testing.T, configFile string) map[string]interface{}

func ResetFireFly added in v1.1.0

func ResetFireFly(t *testing.T, client *resty.Client)

func ValidateAccountBalances added in v1.1.0

func ValidateAccountBalances(t *testing.T, client *client.FireFlyClient, poolID *fftypes.UUID, tokenIndex string, balances map[string]int64)

func VerifyAllOperationsSucceeded added in v1.1.0

func VerifyAllOperationsSucceeded(t *testing.T, clients []*client.FireFlyClient, startTime time.Time)

func VerifyOperationsAlreadyMarkedFailed added in v1.3.0

func VerifyOperationsAlreadyMarkedFailed(t *testing.T, clients []*client.FireFlyClient, startTime time.Time)

func WaitForContractEvent added in v1.1.0

func WaitForContractEvent(t *testing.T, client *client.FireFlyClient, c chan *core.EventDelivery, match map[string]interface{}) map[string]interface{}

func WaitForEvent added in v1.1.0

func WaitForEvent(t *testing.T, c chan *core.EventDelivery, eventType core.EventType, ref *fftypes.UUID)

func WaitForIdentityConfirmed added in v1.1.0

func WaitForIdentityConfirmed(t *testing.T, c chan *core.EventDelivery) *core.EventDelivery

func WaitForMessageConfirmed added in v1.1.0

func WaitForMessageConfirmed(t *testing.T, c chan *core.EventDelivery, msgType core.MessageType) *core.EventDelivery

func WaitForMessageRejected added in v1.1.0

func WaitForMessageRejected(t *testing.T, c chan *core.EventDelivery, msgType core.MessageType) *core.EventDelivery

func WriteConfig added in v1.1.0

func WriteConfig(t *testing.T, configFile string, data map[string]interface{})

func WsReader added in v1.1.0

func WsReader(conn *websocket.Conn) chan *core.EventDelivery

Types

type Member

type Member struct {
	ExposedFireflyPort   int         `json:"exposedFireflyPort,omitempty"`
	ExposedAdminPort     int         `json:"exposedFireflyAdminPort,omitempty"`
	FireflyHostname      string      `json:"fireflyHostname,omitempty"`
	Username             string      `json:"username,omitempty"`
	Password             string      `json:"password,omitempty"`
	UseHTTPS             bool        `json:"useHttps,omitempty"`
	ExposedConnectorPort int         `json:"exposedConnectorPort,omitempty"`
	OrgName              string      `json:"orgName,omitempty"`
	Account              interface{} `json:"account,omitempty"`
}

type Stack

type Stack struct {
	Name                  string    `json:"name,omitempty"`
	ExposedBlockchainPort int       `json:"exposedBlockchainPort,omitempty"`
	BlockchainProvider    string    `json:"blockchainProvider"`
	TokenProviders        []string  `json:"tokenProviders"`
	Members               []*Member `json:"members,omitempty"`
	Database              string    `json:"database"`
}

func ReadStack

func ReadStack(t *testing.T) *Stack

func ReadStackFile added in v1.1.0

func ReadStackFile(filename string) (*Stack, error)

type StackState added in v1.0.0

type StackState struct {
	Accounts []interface{} `json:"accounts"`
}

func ReadStackState added in v1.0.0

func ReadStackState(t *testing.T) *StackState

func ReadStackStateFile added in v1.1.0

func ReadStackStateFile(filename string) (*StackState, error)

type TestState added in v1.1.0

type TestState interface {
	T() *testing.T
	StartTime() time.Time
	Done() func()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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