testutil

package
v0.43.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package testutil provides shared test helpers for truffle packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestEnv

type TestEnv struct {
	// URL is the base URL of the Substrate server.
	URL string
	// AWSConfig is a pre-configured aws.Config pointing at the Substrate server.
	AWSConfig aws.Config
}

TestEnv holds a running Substrate server and a pre-configured AWS config that points all SDK calls at the emulator.

func SubstrateServer

func SubstrateServer(t *testing.T) *TestEnv

SubstrateServer starts a Substrate emulator and returns a TestEnv. The server is shut down automatically when the test ends.

func (*TestEnv) EC2Client

func (e *TestEnv) EC2Client() *ec2.Client

EC2Client returns an EC2 client pointed at the Substrate server.

func (*TestEnv) ServiceQuotasClient

func (e *TestEnv) ServiceQuotasClient() *servicequotas.Client

ServiceQuotasClient returns a Service Quotas client pointed at the Substrate server.

Jump to

Keyboard shortcuts

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