Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add test and fix miss BeginBlock #523

Merged
merged 6 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions .github/workflows/interchaintest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,102 @@ jobs:
env:
BRANCH_CI: "latest"

test-chain-core:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v4
with:
go-version: '1.22'

- name: checkout code
uses: actions/checkout@v4

- run: make ictest-chain-core
env:
BRANCH_CI: "latest"

test-ibc-cosmos:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v4
with:
go-version: '1.22'

- name: checkout code
uses: actions/checkout@v4

- run: make ictest-ibc-cosmos
env:
BRANCH_CI: "latest"

test-ictest-ibc-hooks:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v4
with:
go-version: '1.22'

- name: checkout code
uses: actions/checkout@v4

- run: make ictest-ibc-hooks
env:
BRANCH_CI: "latest"

test-ictest-miscellaneous:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v4
with:
go-version: '1.22'

- name: checkout code
uses: actions/checkout@v4

- run: make ictest-miscellaneous
env:
BRANCH_CI: "latest"

test-ictest-pfm-timeout:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v4
with:
go-version: '1.22'

- name: checkout code
uses: actions/checkout@v4

- run: make ictest-pfm-timeout
env:
BRANCH_CI: "latest"

test-ictest-pfm:
runs-on: ubuntu-latest
needs: build-and-push-image
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v4
with:
go-version: '1.22'

- name: checkout code
uses: actions/checkout@v4

- run: make ictest-pfm
env:
BRANCH_CI: "latest"

# test-ibc-transfer:
# runs-on: ubuntu-latest
# needs: build-and-push-image
Expand Down
24 changes: 23 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,34 @@ ictest-upgrade:
cd tests/interchaintest && go test -timeout=25m -race -v -run TestCentauriUpgrade .

# Executes all tests via interchaintest after compling a local image as juno:local
ictest-all: ictest-start-cosmos ictest-start-polkadot ictest-ibc
ictest-all: ictest-start-cosmos ictest-start-polkadot ictest-ibc ictest-ibc-cosmos ictest-chain-core ictest-pfm ictest-pfm-router ictest-pfm-timeout ictest-miscellaneous ictest-ibc-hooks

# Executes push wasm client tests via interchaintest
ictest-push-wasm:
cd tests/interchaintest && go test -race -v -run TestPushWasmClientCode .

ictest-ibc-cosmos:
cd tests/interchaintest && go test -race -v -run TestComposableGaiaIBCTransfer .

ictest-chain-core:
cd tests/interchaintest && go test -race -v -run TestCoreSDKCommands .

ictest-pfm-timeout:
cd tests/interchaintest && go test -race -v -run TestTimeoutOnForward .

ictest-pfm:
cd tests/interchaintest && go test -race -v -run TestPacketForwardMiddleware .

ictest-pfm-router:
cd tests/interchaintest && go test -race -v -run TestPacketForwardMiddlewareRouter .

ictest-ibc-hooks:
cd tests/interchaintest && go test -race -v -run TestComposableIBCHooks .

ictest-miscellaneous:
cd tests/interchaintest && go test -race -v -run TestICTestMiscellaneous .


# Init 2 cosmos chains and setup ibc between them
init-test-interchain: clean-testing-data install
./scripts/test-upgrade-cosmos-chains.sh
Expand Down
1 change: 1 addition & 0 deletions app/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ func SetupWithGenesisValSet(
// init chain will set the validator set and initialize the genesis accounts
_, err = app.InitChain(
&abci.RequestInitChain{
Time: time.Now(),
ChainId: chainID,
Validators: []abci.ValidatorUpdate{},
ConsensusParams: consensusParams,
Expand Down
1 change: 1 addition & 0 deletions scripts/run-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ $BINARY gentx $KEY 10030009994127689ppica --keyring-backend $KEYRING --chain-id

update_test_genesis '.app_state["gov"]["params"]["voting_period"]="20s"'
update_test_genesis '.app_state["gov"]["params"]["expedited_voting_period"]="10s"'
update_test_genesis '.app_state["stakingmiddleware"]["params"]["blocks_per_epoch"]="5"'
update_test_genesis '.app_state["mint"]["params"]["mint_denom"]="'$DENOM'"'
update_test_genesis '.app_state["gov"]["params"]["min_deposit"]=[{"denom":"'$DENOM'","amount": "1"}]'
update_test_genesis '.app_state["crisis"]["constant_fee"]={"denom":"'$DENOM'","amount":"1000"}'
Expand Down
Loading
Loading