Skip to content

Commit

Permalink
Rename to interchaintest (#386)
Browse files Browse the repository at this point in the history
  • Loading branch information
agouin authored Jan 31, 2023
1 parent 9af2397 commit 0bdc194
Show file tree
Hide file tree
Showing 107 changed files with 511 additions and 509 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @strangelove-ventures/ibctest-maintainers
* @strangelove-ventures/interchaintest-maintainers
18 changes: 9 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
with:
go-version: 1.18

- name: checkout ibctest
- name: checkout interchaintest
uses: actions/checkout@v3

# cleanup environment on self-hosted test runner
- name: clean
run: |-
rm -rf ~/.ibctest
rm -rf ~/.interchaintest
# run tests
- name: run unit tests
Expand All @@ -43,17 +43,17 @@ jobs:
with:
go-version: 1.18

- name: checkout ibctest
- name: checkout interchaintest
uses: actions/checkout@v3

# cleanup environment on self-hosted test runner
- name: clean
run: |-
rm -rf ~/.ibctest
rm -rf ~/.interchaintest
# run tests
- name: run conformance tests
run: (go test -race -timeout 30m -v -p 2 ./cmd/ibctest) || (echo "\n\n*****CHAIN and RELAYER LOGS*****" && cat "$HOME/.ibctest/logs/ibctest.log" && exit 1)
run: (go test -race -timeout 30m -v -p 2 ./cmd/interchaintest) || (echo "\n\n*****CHAIN and RELAYER LOGS*****" && cat "$HOME/.interchaintest/logs/interchaintest.log" && exit 1)
test-ibc-examples:
name: test-ibc-examples
runs-on: [self-hosted, linux]
Expand All @@ -64,13 +64,13 @@ jobs:
with:
go-version: 1.18

- name: checkout ibctest
- name: checkout interchaintest
uses: actions/checkout@v3

# cleanup environment on self-hosted test runner
- name: clean
run: |-
rm -rf ~/.ibctest
rm -rf ~/.interchaintest
# run tests
- name: run example ibc tests
Expand All @@ -85,13 +85,13 @@ jobs:
with:
go-version: 1.18

- name: checkout ibctest
- name: checkout interchaintest
uses: actions/checkout@v3

# cleanup environment on self-hosted test runner
- name: clean
run: |-
rm -rf ~/.ibctest
rm -rf ~/.interchaintest
# run tests
- name: run example cosmos tests
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Don't commit the ibctest.test file,
# Don't commit the interchaintest.test file,
# regardless of where it was built.
ibctest.test
interchaintest.test

/bin
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ default: help
help: ## Print this help message
@echo "Available make commands:"; grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

.PHONY: ibctest
ibctest: gen ## Build ibctest binary into ./bin
go test -ldflags "-X github.com/strangelove-ventures/ibctest/v6/internal/version.GitSha=$(shell git describe --always --dirty)" -c -o ./bin/ibctest ./cmd/ibctest
.PHONY: interchaintest
interchaintest: gen ## Build interchaintest binary into ./bin
go test -ldflags "-X github.com/strangelove-ventures/interchaintest/v6/internal/version.GitSha=$(shell git describe --always --dirty)" -c -o ./bin/interchaintest ./cmd/interchaintest

.PHONY: test
test: ## Run unit tests
@go test -cover -short -race -timeout=60s ./...

.PHONY: docker-reset
docker-reset: ## Attempt to delete all running containers. Useful if ibctest does not exit cleanly.
docker-reset: ## Attempt to delete all running containers. Useful if interchaintest does not exit cleanly.
@docker stop $(shell docker ps -q) &>/dev/null || true
@docker rm --force $(shell docker ps -q) &>/dev/null || true

Expand Down
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<div align="center">
<h1>ibctest</h1>
<h1>interchaintest</h1>

[![Go Reference](https://pkg.go.dev/badge/github.com/strangelove-ventures/[email protected])](https://pkg.go.dev/github.com/strangelove-ventures/ibctest@main)
[![License: Apache-2.0](https://img.shields.io/github/license/strangelove-ventures/ibctest.svg?style=flat-square)](https://github.com/strangelove-ventures/ibctest/blob/main/create-test-readme/LICENSE)
[![Go Report Card](https://goreportcard.com/badge/github.com/strangelove-ventures/ibctest)](https://goreportcard.com/report/github.com/strangelove-ventures/ibctest)
Formerly known as `ibctest`.

[![Go Reference](https://pkg.go.dev/badge/github.com/strangelove-ventures/[email protected])](https://pkg.go.dev/github.com/strangelove-ventures/interchaintest@main)
[![License: Apache-2.0](https://img.shields.io/github/license/strangelove-ventures/interchaintest.svg?style=flat-square)](https://github.com/strangelove-ventures/interchaintest/blob/main/create-test-readme/LICENSE)
[![Go Report Card](https://goreportcard.com/badge/github.com/strangelove-ventures/interchaintest)](https://goreportcard.com/report/github.com/strangelove-ventures/interchaintest)


`ibctest` orchestrates Go tests that utilize Docker containers for multiple

`interchaintest` orchestrates Go tests that utilize Docker containers for multiple
[IBC](https://docs.cosmos.network/master/ibc/overview.html)-compatible blockchains.

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

### -- Features --
Expand Down Expand Up @@ -39,12 +41,12 @@ While it is not necessary to build the binary, sometimes it can be more convenie

Building binary:
```shell
git clone https://github.com/strangelove-ventures/ibctest.git
cd ibctest
make ibctest
git clone https://github.com/strangelove-ventures/interchaintest.git
cd interchaintest
make interchaintest
```

This places the binary in `ibctest/.bin/ibctest`
This places the binary in `interchaintest/.bin/interchaintest`

Note that this is not in your Go path.

Expand All @@ -57,7 +59,7 @@ Please read the [logging style guide](./docs/logging.md).

## Trophies

Significant bugs that were more easily fixed with `ibctest`:
Significant bugs that were more easily fixed with `interchaintest`:

- [Juno network halt reproduction](https://github.com/strangelove-ventures/ibctest/pull/7)
- [Juno network halt fix confirmation](https://github.com/strangelove-ventures/ibctest/pull/8)
- [Juno network halt reproduction](https://github.com/strangelove-ventures/interchaintest/pull/7)
- [Juno network halt fix confirmation](https://github.com/strangelove-ventures/interchaintest/pull/8)
4 changes: 2 additions & 2 deletions chain/cosmos/broadcaster.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/tx/signing"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/strangelove-ventures/ibctest/v6/internal/dockerutil"
"github.com/strangelove-ventures/interchaintest/v6/internal/dockerutil"
)

type ClientContextOpt func(clientContext client.Context) client.Context
Expand Down Expand Up @@ -172,7 +172,7 @@ func (b *Broadcaster) defaultTxFactory(clientCtx client.Context, accountNumber u
WithGasAdjustment(chainConfig.GasAdjustment).
WithGas(flags.DefaultGasLimit).
WithGasPrices(chainConfig.GasPrices).
WithMemo("ibctest").
WithMemo("interchaintest").
WithTxConfig(clientCtx.TxConfig).
WithAccountRetriever(clientCtx.AccountRetriever).
WithKeybase(clientCtx.Keyring).
Expand Down
10 changes: 5 additions & 5 deletions chain/cosmos/chain_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ import (
dockerclient "github.com/docker/docker/client"
"github.com/docker/docker/errdefs"
"github.com/docker/go-connections/nat"
"github.com/strangelove-ventures/ibctest/v6/ibc"
"github.com/strangelove-ventures/ibctest/v6/internal/blockdb"
"github.com/strangelove-ventures/ibctest/v6/internal/dockerutil"
"github.com/strangelove-ventures/ibctest/v6/testutil"
"github.com/strangelove-ventures/interchaintest/v6/ibc"
"github.com/strangelove-ventures/interchaintest/v6/internal/blockdb"
"github.com/strangelove-ventures/interchaintest/v6/internal/dockerutil"
"github.com/strangelove-ventures/interchaintest/v6/testutil"
tmjson "github.com/tendermint/tendermint/libs/json"
"github.com/tendermint/tendermint/p2p"
rpcclient "github.com/tendermint/tendermint/rpc/client"
Expand Down Expand Up @@ -195,7 +195,7 @@ func (tn *ChainNode) HomeDir() string {
return path.Join("/var/cosmos-chain", tn.Chain.Config().Name)
}

// SetTestConfig modifies the config to reasonable values for use within ibctest.
// SetTestConfig modifies the config to reasonable values for use within interchaintest.
func (tn *ChainNode) SetTestConfig(ctx context.Context) error {
c := make(testutil.Toml)

Expand Down
10 changes: 5 additions & 5 deletions chain/cosmos/cosmos_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import (
dockertypes "github.com/docker/docker/api/types"
volumetypes "github.com/docker/docker/api/types/volume"
"github.com/docker/docker/client"
"github.com/strangelove-ventures/ibctest/v6/chain/internal/tendermint"
"github.com/strangelove-ventures/ibctest/v6/ibc"
"github.com/strangelove-ventures/ibctest/v6/internal/blockdb"
"github.com/strangelove-ventures/ibctest/v6/internal/dockerutil"
"github.com/strangelove-ventures/ibctest/v6/testutil"
"github.com/strangelove-ventures/interchaintest/v6/chain/internal/tendermint"
"github.com/strangelove-ventures/interchaintest/v6/ibc"
"github.com/strangelove-ventures/interchaintest/v6/internal/blockdb"
"github.com/strangelove-ventures/interchaintest/v6/internal/dockerutil"
"github.com/strangelove-ventures/interchaintest/v6/testutil"
"go.uber.org/zap"
"golang.org/x/sync/errgroup"
"google.golang.org/grpc"
Expand Down
2 changes: 1 addition & 1 deletion chain/cosmos/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"

stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"github.com/strangelove-ventures/ibctest/v6/chain/cosmos"
"github.com/strangelove-ventures/interchaintest/v6/chain/cosmos"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion chain/cosmos/osmosis.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path/filepath"
"strings"

"github.com/strangelove-ventures/ibctest/v6/internal/dockerutil"
"github.com/strangelove-ventures/interchaintest/v6/internal/dockerutil"
)

// OsmosisPoolParams defines parameters for creating an osmosis gamm liquidity pool
Expand Down
4 changes: 2 additions & 2 deletions chain/cosmos/poll.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"fmt"

codectypes "github.com/cosmos/cosmos-sdk/codec/types"
"github.com/strangelove-ventures/ibctest/v6/ibc"
"github.com/strangelove-ventures/ibctest/v6/testutil"
"github.com/strangelove-ventures/interchaintest/v6/ibc"
"github.com/strangelove-ventures/interchaintest/v6/testutil"
)

// PollForProposalStatus attempts to find a proposal with matching ID and status.
Expand Down
2 changes: 1 addition & 1 deletion chain/cosmos/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cosmos

import (
"github.com/cosmos/cosmos-sdk/types"
"github.com/strangelove-ventures/ibctest/v6/ibc"
"github.com/strangelove-ventures/interchaintest/v6/ibc"
)

var _ ibc.Wallet = &CosmosWallet{}
Expand Down
6 changes: 3 additions & 3 deletions chain/internal/tendermint/tendermint_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
dockerclient "github.com/docker/docker/client"
"github.com/docker/go-connections/nat"
"github.com/hashicorp/go-version"
"github.com/strangelove-ventures/ibctest/v6/ibc"
"github.com/strangelove-ventures/ibctest/v6/internal/dockerutil"
"github.com/strangelove-ventures/ibctest/v6/testutil"
"github.com/strangelove-ventures/interchaintest/v6/ibc"
"github.com/strangelove-ventures/interchaintest/v6/internal/dockerutil"
"github.com/strangelove-ventures/interchaintest/v6/testutil"
tmjson "github.com/tendermint/tendermint/libs/json"
"github.com/tendermint/tendermint/p2p"
rpcclient "github.com/tendermint/tendermint/rpc/client"
Expand Down
4 changes: 2 additions & 2 deletions chain/penumbra/penumbra_app_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/docker/docker/api/types/network"
"github.com/docker/docker/client"
"github.com/docker/go-connections/nat"
"github.com/strangelove-ventures/ibctest/v6/ibc"
"github.com/strangelove-ventures/ibctest/v6/internal/dockerutil"
"github.com/strangelove-ventures/interchaintest/v6/ibc"
"github.com/strangelove-ventures/interchaintest/v6/internal/dockerutil"
"go.uber.org/zap"
)

Expand Down
8 changes: 4 additions & 4 deletions chain/penumbra/penumbra_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import (
"github.com/docker/docker/api/types"
volumetypes "github.com/docker/docker/api/types/volume"
"github.com/docker/docker/client"
"github.com/strangelove-ventures/ibctest/v6/chain/internal/tendermint"
"github.com/strangelove-ventures/ibctest/v6/ibc"
"github.com/strangelove-ventures/ibctest/v6/internal/dockerutil"
"github.com/strangelove-ventures/ibctest/v6/testutil"
"github.com/strangelove-ventures/interchaintest/v6/chain/internal/tendermint"
"github.com/strangelove-ventures/interchaintest/v6/ibc"
"github.com/strangelove-ventures/interchaintest/v6/internal/dockerutil"
"github.com/strangelove-ventures/interchaintest/v6/testutil"
"go.uber.org/zap"
"golang.org/x/sync/errgroup"
)
Expand Down
2 changes: 1 addition & 1 deletion chain/penumbra/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package penumbra

import (
"github.com/cosmos/cosmos-sdk/types"
"github.com/strangelove-ventures/ibctest/v6/ibc"
"github.com/strangelove-ventures/interchaintest/v6/ibc"
)

var _ ibc.Wallet = &PenumbraWallet{}
Expand Down
2 changes: 1 addition & 1 deletion chain/polkadot/keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/centrifuge/go-substrate-rpc-client/v4/signature"
p2pCrypto "github.com/libp2p/go-libp2p-core/crypto"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/strangelove-ventures/ibctest/v6/chain/polkadot"
"github.com/strangelove-ventures/interchaintest/v6/chain/polkadot"
"github.com/stretchr/testify/require"
)

Expand Down
4 changes: 2 additions & 2 deletions chain/polkadot/parachain_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"github.com/icza/dyno"
p2pcrypto "github.com/libp2p/go-libp2p-core/crypto"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/strangelove-ventures/ibctest/v6/ibc"
"github.com/strangelove-ventures/ibctest/v6/internal/dockerutil"
"github.com/strangelove-ventures/interchaintest/v6/ibc"
"github.com/strangelove-ventures/interchaintest/v6/internal/dockerutil"
"go.uber.org/zap"
)

Expand Down
4 changes: 2 additions & 2 deletions chain/polkadot/polkadot_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"github.com/docker/docker/client"
"github.com/icza/dyno"
p2pcrypto "github.com/libp2p/go-libp2p-core/crypto"
"github.com/strangelove-ventures/ibctest/v6/ibc"
"github.com/strangelove-ventures/ibctest/v6/internal/dockerutil"
"github.com/strangelove-ventures/interchaintest/v6/ibc"
"github.com/strangelove-ventures/interchaintest/v6/internal/dockerutil"
"go.uber.org/zap"
"golang.org/x/sync/errgroup"
)
Expand Down
6 changes: 3 additions & 3 deletions chain/polkadot/polkadot_chain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"testing"

ibctest "github.com/strangelove-ventures/ibctest/v6"
"github.com/strangelove-ventures/ibctest/v6/ibc"
interchaintest "github.com/strangelove-ventures/interchaintest/v6"
"github.com/strangelove-ventures/interchaintest/v6/ibc"
"github.com/stretchr/testify/require"
"go.uber.org/zap/zaptest"
)
Expand All @@ -16,7 +16,7 @@ func TestWalletMethods(t *testing.T) {
nv := 5
nf := 3

chains, err := ibctest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*ibctest.ChainSpec{
chains, err := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{
{
ChainConfig: ibc.ChainConfig{
Type: "polkadot",
Expand Down
4 changes: 2 additions & 2 deletions chain/polkadot/relay_chain_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"go.uber.org/zap"

"github.com/decred/dcrd/dcrec/secp256k1/v2"
"github.com/strangelove-ventures/ibctest/v6/ibc"
"github.com/strangelove-ventures/ibctest/v6/internal/dockerutil"
"github.com/strangelove-ventures/interchaintest/v6/ibc"
"github.com/strangelove-ventures/interchaintest/v6/internal/dockerutil"
)

// RelayChainNode defines the properties required for running a polkadot relay chain node.
Expand Down
2 changes: 1 addition & 1 deletion chain/polkadot/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
gsrpc "github.com/centrifuge/go-substrate-rpc-client/v4"
"github.com/centrifuge/go-substrate-rpc-client/v4/signature"
gstypes "github.com/centrifuge/go-substrate-rpc-client/v4/types"
"github.com/strangelove-ventures/ibctest/v6/ibc"
"github.com/strangelove-ventures/interchaintest/v6/ibc"
)

// SendFundsTx sends funds to a wallet using the SubstrateAPI
Expand Down
2 changes: 1 addition & 1 deletion chain/polkadot/wallet.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package polkadot

import (
"github.com/strangelove-ventures/ibctest/v6/ibc"
"github.com/strangelove-ventures/interchaintest/v6/ibc"
)

var _ ibc.Wallet = &PolkadotWallet{}
Expand Down
Loading

0 comments on commit 0bdc194

Please sign in to comment.