-
Notifications
You must be signed in to change notification settings - Fork 20
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
Conversation
|
||
# build a node container | ||
.PHONY: docker-build-debug | ||
docker-build-debug: |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
tests/e2e/chain.go
Outdated
return nil | ||
} | ||
|
||
// func (c *chain) createAndInitValidatorsWithMnemonics(count int, mnemonics []string) error { |
There was a problem hiding this comment.
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
tests/e2e/e2e_util_test.go
Outdated
s.T().Log("successfully sent IBC tokens") | ||
} | ||
|
||
// func queryNibiruTx(endpoint, txHash string) error { |
There was a problem hiding this comment.
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
tests/e2e/e2e_util_test.go
Outdated
return balancesResp.Balances, nil | ||
} | ||
|
||
// func queryNibiruDenomBalance(endpoint, addr, denom string) (sdk.Coin, error) { |
There was a problem hiding this comment.
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
tests/e2e/keys.go
Outdated
return mnemonic, nil | ||
} | ||
|
||
// func createMemoryKey() (mnemonic string, info *keyring.Info, err error) { |
There was a problem hiding this comment.
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
tests/e2e/keys.go
Outdated
// return mnemonic, account, nil | ||
// } | ||
|
||
// func createMemoryKeyFromMnemonic(mnemonic string) (*keyring.Info, error) { |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
uses: golangci/golangci-lint-action@v3 |
There was a problem hiding this comment.
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
.github/workflows/lint.yml
Outdated
@@ -15,8 +15,11 @@ jobs: | |||
runs-on: ubuntu-latest | |||
steps: | |||
- uses: actions/checkout@v2 | |||
- uses: actions/[email protected] |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
# 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add LINK_STATICALLY
for wasmd
Ref: https://github.com/CosmWasm/wasmd/blob/master/Makefile#L68
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" |
There was a problem hiding this comment.
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"} }
There was a problem hiding this 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍵
Checklist
Affected core subsystem(s)
Description of change
tests
directorygame
) setting up code are addedRelated issues