Categorygithub.com/agoric-labs/interchaintest/v6
modulepackage
6.0.1-agoriclabs
Repository: https://github.com/agoric-labs/interchaintest.git
Documentation: pkg.go.dev

# README

interchaintest

Formerly known as ibctest.

Go Reference License: Apache-2.0 Go Report Card

interchaintest orchestrates Go tests that utilize Docker containers for multiple IBC-compatible blockchains.

It allows users to quickly spin up custom testnets and dev environments to test IBC, chain infrastructures, smart contracts, etc.

-- Features --

  • Built-in suite of conformance tests to test high-level IBC compatibility between chain sets
  • Easily construct customized tests in highly configurable environments
  • Deployable as CI tests in production workflows

Maintained Branches

Backport Policy:

Strangelove maintains n and n - 1 branches of interchaintest, n being current main.

We strive to keep interchaintest inline with the latest from the ibc-go and cosmos sdk teams. Once an alpha versions of the next major ibc-go version is released, we will discontinue n - 1 and branch off a new n.

Recommendation: Even if your chain uses an older version of ibc-go, try importing from main. This should work unless you are decoding transactions that require a specific ibc-go version.

If there is a feature you would like backported to an older branch, make an issue! We are happy to work with you.

Branch NameIBC-GoCosmos-sdkMaintained
mainv7v0.47
v6v6v0.46
v5v5v0.46
(Aug 11 2023)
v4v4v0.45
(Aug 11 2023)
v4-icsv4v0.45.x-ics
(Aug 11 2023)
v3v3v0.45
(June 25 2023)
v3-icsv3v0.45.11-ics
(April 24 2023)

Table Of Contents


Building Binary

While it is not necessary to build the binary, sometimes it can be more convenient, specifically when running conformance test with custom chain sets.

Building binary:

git clone https://github.com/agoric-labs/interchaintest.git
cd interchaintest
make interchaintest

This places the binary in interchaintest/.bin/interchaintest

Note that this is not in your Go path.

Contributing

Contributing is encouraged.

Please read the logging style guide.

Trophies

Significant bugs that were more easily fixed with interchaintest:

# Packages

No description provided by the author
No description provided by the author
Package conformance exposes a Test function that can be imported into other packages' tests.
No description provided by the author
Package ibc provides chain and relayer agnostic types and interfaces for the IBC spec.
Package relayer contains general functionality relevant to individual relayer implementations.
Package testreporter contains a Reporter for collecting detailed test reports.
Package testutil includes convenience functions and types to help with testing.

# Functions

CreateLogFile creates a file with name in dir $HOME/.interchaintest/logs/.
DefaultBlockDatabaseFilepath is the default filepath to the sqlite database for tracking blocks and transactions.
DockerSetup returns a new Docker Client and the ID of a configured network, associated with t.
GetAndFundTestUsers generates and funds chain users with the native chain denom.
GetAndFundTestUserWithMnemonic restores a user using the given mnemonic and funds it with the native chain denom.
KeepDockerVolumesOnFailure sets whether volumes associated with a particular test are retained or deleted following a test failure.
KeepingTempDirOnFailure reports the current value of KeepTempDirOnFailure.
KeepTempDirOnFailure sets whether a directory created by TempDir is retained or deleted following a test failure.
NewBuiltinChainFactory returns a BuiltinChainFactory that returns chains defined by entries.
No description provided by the author
NewInterchain returns a new Interchain.
startup both chains creates wallets in the relayer for src and dst chain funds relayer src and dst wallets on respective chain in genesis creates a faucet account on the both chains (separate fullnode) funds faucet accounts in genesis.
StopStartRelayerWithPreStartFuncs will stop the relayer if it is currently running, then execute the preRelayerStartFuncs and wait for all to complete before starting the relayer.
TempDir resembles (*testing.T).TempDir, except that it conditionally keeps the temporary directory on disk, and it uses a new temporary directory on each invocation instead of adjacent directories with an incrementing numeric suffix.

# Constants

No description provided by the author

# Structs

BuiltinChainFactory implements ChainFactory to return a fixed set of chains.
ChainSpec is a wrapper around an ibc.ChainConfig that allows callers to easily reference one of the built-in chain configs and optionally provide overrides for some settings.
Interchain represents a full IBC network, encompassing a collection of one or more chains, one or more relayer instances, and initial account configuration.
InterchainBuildOptions describes configuration for (*Interchain).Build.
InterchainLink describes a link between two chains, by specifying the chain names, the relayer name, and the name of the path to create.

# Interfaces

ChainFactory describes how to get chains for tests.
RelayerFactory describes how to start a Relayer.
TempDirTestingT is a subset of testing.TB to implement TempDir.
No description provided by the author