Documentation ¶
Index ¶
- Constants
- Variables
- func AddFeeCredit(t *testing.T, amount uint64, systemID types.SystemID, ...)
- func CreateMoneyPartition(t *testing.T, genesisConfig *testutil.MoneyGenesisConfig, nodeCount uint8) *testpartition.NodePartition
- func CreateNewTestWallet(t *testing.T, opts ...Option) string
- func CreateNewTokenWallet(t *testing.T, addr string) (*tokenswallet.Wallet, string)
- func CreateNewWallet(t *testing.T) (account.Manager, string)
- func CreateTokensPartition(t *testing.T) *testpartition.NodePartition
- func InitRpcServer(node *partition.Node, nodeName string, cfg *abrpc.ServerConfiguration, ...) (*http.Server, error)
- func SetupNetwork(t *testing.T, genesisConfig *testutil.MoneyGenesisConfig, ...) (string, *testpartition.AlphabillNetwork)
- func SetupTestHomeDir(t *testing.T, dir string) string
- func SpendInitialBillWithFeeCredits(t *testing.T, abNet *testpartition.AlphabillNetwork, initialBillValue uint64, ...) uint64
- func StartAlphabill(t *testing.T, partitions []*testpartition.NodePartition) *testpartition.AlphabillNetwork
- func StartPartitionGRPCServers(t *testing.T, partition *testpartition.NodePartition)
- func StartRpcServer(t *testing.T, node *partition.Node, nodeName string, ...) string
- func StartRpcServers(t *testing.T, partition *testpartition.NodePartition)
- func TestPubKey0Hash(t *testing.T) []byte
- func TestPubKey1Hash(t *testing.T) []byte
- func VerifyStdout(t *testing.T, consoleWriter *TestConsoleWriter, expectedLines ...string)
- func VerifyStdoutEventually(t *testing.T, exec func() *TestConsoleWriter, expectedLines ...string)
- func VerifyStdoutEventuallyWithTimeout(t *testing.T, exec func() *TestConsoleWriter, waitFor time.Duration, ...)
- func VerifyStdoutNotExists(t *testing.T, consoleWriter *TestConsoleWriter, expectedLines ...string)
- type Option
- type Options
- type TestConsoleWriter
Constants ¶
View Source
const ( TestMnemonic = "dinosaur simple verify deliver bless ridge monkey design venue six problem lucky" TestPubKey0Hex = "03c30573dc0c7fd43fcb801289a6a96cb78c27f4ba398b89da91ece23e9a99aca3" TestPubKey1Hex = "02d36c574db299904b285aaeb57eb7b1fa145c43af90bec3c635c4174c224587b6" )
View Source
const DefaultT2Timeout = uint32(2500)
Variables ¶
View Source
var ( DefaultInitialBillID = money.NewBillID(nil, []byte{1}) FCRID = money.NewFeeCreditRecordID(nil, []byte{1}) )
Functions ¶
func AddFeeCredit ¶
func AddFeeCredit(t *testing.T, amount uint64, systemID types.SystemID, accountKey *account.AccountKey, unitID, unitBacklink []byte, fcrID, fcrBacklink []byte, node *testpartition.NodePartition)
func CreateMoneyPartition ¶
func CreateMoneyPartition(t *testing.T, genesisConfig *testutil.MoneyGenesisConfig, nodeCount uint8) *testpartition.NodePartition
func CreateNewTokenWallet ¶
func CreateTokensPartition ¶
func CreateTokensPartition(t *testing.T) *testpartition.NodePartition
func InitRpcServer ¶ added in v0.4.0
func InitRpcServer(node *partition.Node, nodeName string, cfg *abrpc.ServerConfiguration, ownerIndexer partition.IndexReader, obs partition.Observability) (*http.Server, error)
func SetupNetwork ¶ added in v0.4.0
func SetupNetwork(t *testing.T, genesisConfig *testutil.MoneyGenesisConfig, otherPartitions []*testpartition.NodePartition) (string, *testpartition.AlphabillNetwork)
SetupNetwork starts alphabill network. Starts money partition, and optionally any other partitions, with rpc servers up and running. Returns money node url and reference to the network object.
func SpendInitialBillWithFeeCredits ¶
func SpendInitialBillWithFeeCredits(t *testing.T, abNet *testpartition.AlphabillNetwork, initialBillValue uint64, pk []byte) uint64
func StartAlphabill ¶
func StartAlphabill(t *testing.T, partitions []*testpartition.NodePartition) *testpartition.AlphabillNetwork
func StartPartitionGRPCServers ¶ added in v0.4.0
func StartPartitionGRPCServers(t *testing.T, partition *testpartition.NodePartition)
func StartRpcServer ¶ added in v0.4.0
func StartRpcServers ¶ added in v0.4.0
func StartRpcServers(t *testing.T, partition *testpartition.NodePartition)
func TestPubKey0Hash ¶ added in v0.4.0
func TestPubKey1Hash ¶ added in v0.4.0
func VerifyStdout ¶
func VerifyStdout(t *testing.T, consoleWriter *TestConsoleWriter, expectedLines ...string)
func VerifyStdoutEventually ¶
func VerifyStdoutEventually(t *testing.T, exec func() *TestConsoleWriter, expectedLines ...string)
func VerifyStdoutNotExists ¶
func VerifyStdoutNotExists(t *testing.T, consoleWriter *TestConsoleWriter, expectedLines ...string)
Types ¶
type Option ¶ added in v0.4.0
type Option func(*Options)
func WithDefaultMnemonic ¶ added in v0.4.0
func WithDefaultMnemonic() Option
func WithNumberOfAccounts ¶ added in v0.4.0
type TestConsoleWriter ¶
type TestConsoleWriter struct {
Lines []string
}
func (*TestConsoleWriter) Print ¶
func (w *TestConsoleWriter) Print(a ...any)
func (*TestConsoleWriter) Println ¶
func (w *TestConsoleWriter) Println(a ...any)
func (*TestConsoleWriter) String ¶
func (w *TestConsoleWriter) String() string
Click to show internal directories.
Click to hide internal directories.