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

integrate with e2e test #135

Merged
merged 24 commits into from
Apr 21, 2022
Merged

integrate with e2e test #135

merged 24 commits into from
Apr 21, 2022

Conversation

tak1827
Copy link
Contributor

@tak1827 tak1827 commented Apr 12, 2022

Checklist

  • succeed all test caes in e2e
  • succeed e2e test on workflow

Affected core subsystem(s)

  • nothing
    • e2e test is independent

Description of change

  • adding e2e test related commands
    • build node docker
    • build relayer docker
    • run e2e tests
  • adding e2e tests under the tests directory
    • all most all code unchanged from original gaia
    • only account address prefix(game) setting up code are added
      • left as comment

Related issues


# build a node container
.PHONY: docker-build-debug
docker-build-debug:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

building the docker for running nibiru node


# build a relayer container
.PHONY: docker-build-hermes
docker-build-hermes:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

building the docker for running relayer

@cd tests/e2e/docker; docker build -t cosmos/hermes-e2e:latest -f hermes.Dockerfile .

.PHONY: test-e2e
test-e2e:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

executing all test cases in e2e

cdc = encodingConfig.Marshaler

config := sdk.GetConfig()
nibiru.SetBech32AddressPrefixes(config)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setting game as address prefix

return nil
}

// func (c *chain) createAndInitValidatorsWithMnemonics(count int, mnemonics []string) error {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment out because of avoiding liner not using error

s.T().Log("successfully sent IBC tokens")
}

// func queryNibiruTx(endpoint, txHash string) error {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment out because of avoiding liner not using error

return balancesResp.Balances, nil
}

// func queryNibiruDenomBalance(endpoint, addr, denom string) (sdk.Coin, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment out because of avoiding liner not using error

return mnemonic, nil
}

// func createMemoryKey() (mnemonic string, info *keyring.Info, err error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment out because of avoiding liner not using error

// return mnemonic, account, nil
// }

// func createMemoryKeyFromMnemonic(mnemonic string) (*keyring.Info, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment out because of avoiding liner not using error

grpc_addr = 'http://$NIBIRU_A_E2E_VAL_HOST:9090'
websocket_addr = 'ws://$NIBIRU_A_E2E_VAL_HOST:26657/websocket'
rpc_timeout = '10s'
account_prefix = 'game'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set game as address prefix

@tak1827 tak1827 self-assigned this Apr 12, 2022
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

upgrade linter version to avoid the folloing error

failed to load package goarch

@@ -15,8 +15,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this setting is required from linter@v3
https://github.com/golangci/golangci-lint-action#compatibility

@@ -0,0 +1,4 @@
run:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests/e2e is not the target of linter
https://github.com/cosmos/gaia/blob/v7.0.0/.golangci.yml#L1

@@ -0,0 +1,33 @@
name: Test
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now e2e is ready on the github workflow

@tak1827 tak1827 requested a review from EG-easy April 13, 2022 11:35
tak1827 added 2 commits April 14, 2022 11:27
# Conflicts:
#	.github/workflows/lint.yml
#	go.mod
#	go.sum
@@ -48,6 +48,9 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=nibiru \
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)"

ifeq ($(LINK_STATICALLY),true)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

app/app.go Outdated
@@ -101,6 +101,9 @@ import (
ibckeeper "github.com/cosmos/ibc-go/v2/modules/core/keeper"

nibiruappparams "github.com/cosmos-gaminghub/nibiru/app/params"
"github.com/strangelove-ventures/packet-forward-middleware/router"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding router module for ibc communication
Without this module, e2e test fail

2022-04-18T02:16:39.699871Z ERROR ThreadId(07) send_tx{id=chain-jN14rx}:estimate_gas: failed to simulate tx. propagating error to caller: gRPC call failed with status: status: Unknown, message: "failed to execute message; message index: 0: route not found to module: transfer: route not found", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc", "x-cosmos-block-height": "24"} }

Copy link
Contributor

@EG-easy EG-easy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove unused functions.

tests/e2e/chain.go Outdated Show resolved Hide resolved
@tak1827 tak1827 requested a review from EG-easy April 21, 2022 08:50
Copy link
Contributor

@EG-easy EG-easy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍵

@tak1827 tak1827 merged commit 49ec354 into dev Apr 21, 2022
@tak1827 tak1827 deleted the feature/add-e2e-test branch April 21, 2022 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants