test

package
v0.24.2 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Abi_EventsTest = []byte(`[{"constant":true,"inputs":[],"name":"count","outputs":[{"name":"size","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_name","type":"string"}],"name":"description","outputs":[{"name":"_description","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"}],"name":"removeThing","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_description","type":"string"}],"name":"addThing","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"},{"indexed":true,"name":"key","type":"bytes32"},{"indexed":true,"name":"description","type":"bytes32"}],"name":"UpdateTestEvents","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"name","type":"bytes32"},{"indexed":true,"name":"key","type":"bytes32"},{"indexed":false,"name":"__DELETE__","type":"int256"}],"name":"DeleteTestEvents","type":"event"}]`)
View Source
var Bytecode_EventsTest = hex.MustDecodeString("608060405234801561001057600080fd5b506107a8806100206000396000f3fe608060405234801561001057600080fd5b5060043610610069576000357c01000000000000000000000000000000000000000000000000000000009004806306661abd1461006e578063882551991461008c578063c1de9c6d1461017e578063dc667a62146101f7575b600080fd5b6100766102c5565b6040518082815260200191505060405180910390f35b610103600480360360208110156100a257600080fd5b81019080803590602001906401000000008111156100bf57600080fd5b8201836020820111156100d157600080fd5b803590602001918460018302840111640100000000831117156100f357600080fd5b90919293919293905050506102ce565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610143578082015181840152602081019050610128565b50505050905090810190601f1680156101705780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101f56004803603602081101561019457600080fd5b81019080803590602001906401000000008111156101b157600080fd5b8201836020820111156101c357600080fd5b803590602001918460018302840111640100000000831117156101e557600080fd5b909192939192939050505061039b565b005b6102c36004803603604081101561020d57600080fd5b810190808035906020019064010000000081111561022a57600080fd5b82018360208201111561023c57600080fd5b8035906020019184600183028401116401000000008311171561025e57600080fd5b90919293919293908035906020019064010000000081111561027f57600080fd5b82018360208201111561029157600080fd5b803590602001918460018302840111640100000000831117156102b357600080fd5b90919293919293905050506104f9565b005b60008054905090565b60606001838360405180838380828437808301925050509250505090815260200160405180910390206001018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561038e5780601f106103635761010080835404028352916020019161038e565b820191906000526020600020905b81548152906001019060200180831161037157829003601f168201915b5050505050905092915050565b600060018383604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff16156104f45760008081548092919060019003919050555060018383604051808383808284378083019250505092505050908152602001604051809103902060008082016000610427919061068f565b600182016000610437919061068f565b6002820160006101000a81549060ff021916905550507f544553545f4556454e54530000000000000000000000000000000000000000006104bb84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610681565b7fb64cbe0d18263bbda93ed76420a5e44f12291ff1187828c94336f06dcb61017860006040518082815260200191505060405180910390a35b505050565b600060018585604051808383808284378083019250505092505050908152602001604051809103902090508060020160009054906101000a900460ff16151561054e5760008081548092919060010191905055505b84848260000191906105619291906106d7565b5082828260010191906105759291906106d7565b5060018160020160006101000a81548160ff0219169083151502179055506105e083838080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610681565b7f544553545f4556454e545300000000000000000000000000000000000000000061064e87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610681565b7f6f50070fb9de82a81ea57052fbdf4459d17a1a9d68083b6f326b47bf17441e2960405160405180910390a45050505050565b600060208201519050919050565b50805460018160011615610100020316600290046000825580601f106106b557506106d4565b601f0160209004906000526020600020908101906106d39190610757565b5b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061071857803560ff1916838001178555610746565b82800160010185558215610746579182015b8281111561074557823582559160200191906001019061072a565b5b5090506107539190610757565b5090565b61077991905b8082111561077557600081600090555060010161075d565b5090565b9056fea165627a7a72305820b80269f52800df97ea8d0eaa20a8d8541f670004f26b92c1fad10c4bd238a6020029")

Functions

func BadJSONConfFile

func BadJSONConfFile(t *testing.T) string

BadJSONConfFile sets a malformed json file to be used in projection tests

func Call

func Call(t testing.TB, cli rpctransact.TransactClient, inputAddress, contractAddress crypto.Address,
	functionName string, args ...interface{}) *exec.TxExecution

func CallAddEvent

func CallAddEvent(t testing.TB, cli rpctransact.TransactClient, inputAddress, contractAddress crypto.Address,
	name, description string) *exec.TxExecution

func CallRemoveEvent

func CallRemoveEvent(t testing.TB, cli rpctransact.TransactClient, inputAddress, contractAddress crypto.Address,
	name string) *exec.TxExecution

func CreateContract

func CreateContract(t testing.TB, cli rpctransact.TransactClient, inputAddress crypto.Address) *exec.TxExecution

func DuplicatedColNameJSONConfFile

func DuplicatedColNameJSONConfFile(t *testing.T) string

DuplicatedColNameJSONConfFile sets a good json file but with duplicated column names for a given table

func GoodJSONConfFile

func GoodJSONConfFile(t *testing.T) string

GoodJSONConfFile sets a good json file to be used in projection tests

func MissingFieldsJSONConfFile

func MissingFieldsJSONConfFile(t *testing.T) string

MissingFieldsJSONConfFile sets a json file with missing fields to be used in projection tests

func NewTestDB

func NewTestDB(t *testing.T, cfg *config.VentConfig) (*sqldb.SQLDB, func())

NewTestDB creates a database connection for testing

func NewTransactClient

func NewTransactClient(t testing.TB, listenAddress string) rpctransact.TransactClient

func PostgresVentConfig

func PostgresVentConfig() *config.VentConfig

func SqliteVentConfig

func SqliteVentConfig() *config.VentConfig

func UnknownTypeJSONConfFile

func UnknownTypeJSONConfFile(t *testing.T) string

UnknownTypeJSONConfFile sets a json file with unknown column types to be used in projection tests

Types

This section is empty.

Jump to

Keyboard shortcuts

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