Skip to content

Commit

Permalink
Outline test component interfaces and implement Cosmos bootstrap cont…
Browse files Browse the repository at this point in the history
…ext (#67)

* Add HasTwoChainTypes and HasTwoWayRelayTypes

* Drafting chain test traits

* Draft more test traits

* Drafting IBC transfer test

* First half of new transfer test done

* Redesign member traits to be N-ary

* Finish fully abstract IBC transfer test

* Implement ChainId forwarder component

* Move abstract test traits to new ibc-test-components crate

* Remove ibc-test-framework-next crate

* Componentize HasLogger trait

* Implement logger component forwarder

* Implement Cosmos test types

* Implementing IBC token transfer component

* Reorganize transaction components

* Rename SendMessagesAsTx to SendMessagesWithSignerAndNonce

* Add messages with signer sender

* Finish implementing abstract IBC transfer message sender

* Fix clippy

* Implement PollAssertEventualAmount

* Rename ibc_cosmos_client_components crate to cosmos_client_components

* Move test components to new cosmos-test-components crate

* Fix clippy

* Implementing Cosmos chain bootstrapper

* Finish implementing Cosmos test wallet adder

* Use abstract file path type

* Add genesis file initializer and modifier

* Reorganize bootstrap traits

* Reorganize code

* Implement Cosmos chain config initializer

* Make Cosmos config initializers more concrete

* Implement generation of genesis wallets

* Reorganize genesis code

* Fix clippy

* Refactor chain data initializer trait

* Implement add Cosmos genesis account

* Move commands implementation to genesis module

* Implement genesis validator adder

* Add and implement gentxs collector

* Add call to init_chain_config in bootstrap chain

* Slight refactoring

* Rename add_wallet to init_wallet

* Refactor code for adding wallets to genesis

* Add components for starting chain full node

* Implementing async file process spawner

* Refactor runtime traits to use runtime context

* Use ChainId type from chain context instead of bootstrap context

* Move test runtime traits to ibc-test-components

* Move child process implementation to ibc-relayer-runtime

* Reorganize test modules

* Use HasInner trait from cgp-inner

* Implement logic for handling premature child process exit

* Use Amount and Address types from chain context

* Build chain context from bootstrap parameters

* Refactor TokioRuntimeError to be plain enum

* Implement ProvideFilePathType

* Move runtime component providers to tokio-runtime-components trait

* Implement FileAsStringReader

* Implement CommandExecutor

* Fix clippy

* Implement StringToFileWriter

* Implement TcpPortReserver

* Implement Tokio ChildProcess type provider

* Reorganize code

* Make port listening async

* No need to set minimum gas to zero when initializing chain config

* Reorganize Cosmos test components

* Add back chain::impls modules

* Reorganize bootstrap modules

* Building Cosmos SDK bootstrap component graph

* Implement chain home dir initializer

* Implement chain id generator

* Build component graph closure for CosmosSdkBootstrapComponents

* Fix clippy

* Move components module one level up

* Implementing Cosmos bootstrap context

* Implement chain config modifier

* Implementing test dependencies on CosmosChain context

* Most of CosmosStdBootstrapContext are implemented

* Implement standard wallet config generator

* Finished implementing CosmosStdBootstrapContext

* Cosmos chain bootstrapping is now working

* Add genesis denom fields to Cosmos genesis config

* Move Cosmos integration tests to separate crate

* Introduce new CosmosTestChain as the chain context for tests

* Fix clippy

* Remove test data

* Add CI for new integration tests
  • Loading branch information
soareschen authored Dec 13, 2023
1 parent 169ff15 commit 6302d31
Show file tree
Hide file tree
Showing 312 changed files with 5,097 additions and 601 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/integration-tests-next.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Integration Tests Next
on:
pull_request: {}
push:
branches: main

# Cancel previous runs of this workflow when a new commit is added to the PR, branch or tag
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
integration-tests-next:
runs-on: ubuntu-20.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
with:
install_url: https://nixos-nix-install-tests.cachix.org/serve/vij683ly7sl95nnhb67bdjjfabclr85m/install
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
extra_nix_config: |
experimental-features = nix-command flakes
- uses: cachix/cachix-action@v12
with:
name: cosmos
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
with:
command: test
args: -p cosmos-integration-tests --no-fail-fast --no-run
- name: run integration tests
env:
RUST_BACKTRACE: 1
run: |
nix shell .#gaia14 -c cargo \
test -p cosmos-integration-tests --no-fail-fast -- \
--nocapture --test-threads=2
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ on:
push:
branches: main

env:
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 1
CARGO_PROFILE_RELEASE_DEBUG: 1
RUST_BACKTRACE: short
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10

# Cancel previous runs of this workflow when a new commit is added to the PR, branch or tag
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: nextest
args: run --all-features --no-fail-fast --workspace --exclude ibc-integration-test --no-capture
args: run --all-features --no-fail-fast --workspace --exclude ibc-integration-test --exclude cosmos-integration-tests --no-capture
Loading

0 comments on commit 6302d31

Please sign in to comment.