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

Terra localnet #405

Closed
Closed
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
76358d4
Init setup for e2e-test
phamminh0811 Jan 3, 2024
91f347f
Add chain to e2e
phamminh0811 Jan 3, 2024
253e2c2
add io to e2e
DongLieu Jan 3, 2024
554eb69
Add local.Dockerfile to build e2e
phamminh0811 Jan 6, 2024
8164fdc
add localterra and fix local dockerfile workdir
expertdicer Jan 8, 2024
e916648
add localrelayer setup
expertdicer Jan 8, 2024
95572ca
support both amd64 and arm64 in local Dockerfile and add right hd-pat…
expertdicer Jan 9, 2024
4a560ea
change to ubuntu 23.04
expertdicer Jan 9, 2024
a367697
remove faucet and add delay in hermes start
expertdicer Jan 10, 2024
ba19b6d
bytecodes and scripts for ibc-hooks
expertdicer Jan 10, 2024
d9cb3c1
update readme
expertdicer Jan 10, 2024
7dc6a45
fix ibc hooks test scripts and counter bytecode
expertdicer Jan 10, 2024
cc11f33
add local terra c chain
expertdicer Jan 10, 2024
685769c
add apptesting
expertdicer Jan 11, 2024
01b53bf
fix app to compatible with ibctesting.TestChain
expertdicer Jan 11, 2024
9ba2410
ibc-hooks scripts test
expertdicer Jan 11, 2024
2f468ea
update localrelayer
expertdicer Jan 13, 2024
6c1346f
add ibctesting
expertdicer Jan 13, 2024
c8d00ed
scripts for pfm test
expertdicer Jan 13, 2024
afb4ae0
fix pfm and pfm subspace
expertdicer Jan 13, 2024
ca0ed06
minor fix
expertdicer Jan 14, 2024
16a8096
forward middleware module setup
expertdicer Jan 14, 2024
05bf1df
go mod tidy
expertdicer Jan 14, 2024
f056561
ibchooks testutil
expertdicer Jan 14, 2024
bb59cd6
remove redundant e2e tests
expertdicer Jan 15, 2024
2bb70c7
rm e2e.mk
expertdicer Jan 15, 2024
5d4b21d
Remove e2e cmd in Makefile
expertdicer Jan 15, 2024
a1a075d
lint
expertdicer Jan 15, 2024
fb33efe
remove apptesting
expertdicer Jan 15, 2024
3b6990b
remove terratesting and changes in app.go
expertdicer Jan 15, 2024
14fbf2c
remove test_helpers and mod tidy
expertdicer Jan 15, 2024
19d574c
merge main
phamminh0811 Jan 29, 2024
c403fe8
remove not related test
phamminh0811 Jan 29, 2024
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
Prev Previous commit
Next Next commit
Remove e2e cmd in Makefile
expertdicer committed Jan 15, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 5d4b21dc90486ca32593e2c2b9e23b09662c3ded
18 changes: 5 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -229,30 +229,22 @@ clean:
###############################################################################

include sims.mk
include e2e.mk

PACKAGES_UNIT=$(shell go list ./... | grep -v -e '/tests/e2e')
PACKAGES_E2E=$(shell cd tests/e2e && go list ./... | grep '/e2e')
TEST_PACKAGES=./...

test: test-unit

test-all: test-unit test-race test-cover test-e2e
test-all: test-unit test-race test-cover

test-unit:
@VERSION=$(VERSION) go test -mod=readonly -tags='ledger test_ledger_mock' $(PACKAGES_UNIT)
@VERSION=$(VERSION) go test -mod=readonly -tags='ledger test_ledger_mock' ./...

test-race:
@VERSION=$(VERSION) go test -mod=readonly -race -tags='ledger test_ledger_mock' $(PACKAGES_UNIT)
@VERSION=$(VERSION) go test -mod=readonly -race -tags='ledger test_ledger_mock' ./...

test-cover:
@go test -mod=readonly -timeout 30m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' $(PACKAGES_UNIT)

test-e2e:
@VERSION=$(VERSION) go test -mod=readonly -timeout 30m $(PACKAGES_E2E)
@go test -mod=readonly -timeout 30m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' ./...

benchmark:
@go test -mod=readonly -bench=. $(PACKAGES_UNIT)
@go test -mod=readonly -bench=. ./...

.PHONY: test test-all test-cover test-unit test-race


Unchanged files with check annotations Beta

"github.com/classic-terra/core/v2/app/keepers"
terraappparams "github.com/classic-terra/core/v2/app/params"

Check failure on line 44 in app/app.go

GitHub Actions / golangci-lint

File is not `gofumpt`-ed (gofumpt)
ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper"
capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper"

Check failure on line 46 in app/app.go

GitHub Actions / golangci-lint

File is not `gofumpt`-ed (gofumpt)
// upgrades
func (app *TerraApp) GetTxConfig() client.TxConfig {
return MakeEncodingConfig().TxConfig
}

Check failure on line 445 in app/app.go

GitHub Actions / golangci-lint

File is not `gofumpt`-ed (gofumpt)

Check failure on line 445 in app/app.go

GitHub Actions / run-tests

syntax error: unexpected var after top level declaration
suite.Require().NoError(err)
// recv in chain a
res, err := suite.path.EndpointA.RecvPacketWithResult(packet)

Check failure on line 192 in tests/ibc-hooks/ibc_middleware_test.go

GitHub Actions / golangci-lint

ineffectual assignment to err (ineffassign)
// get the ack from the chain a's response
ack, err := ibctesting.ParseAckFromEvents(res.GetEvents())
} else {
suite.Require().Contains(ackStr, "error", tc.memo)
}
sequence += 1

Check warning on line 309 in tests/ibc-hooks/ibc_middleware_test.go

GitHub Actions / golangci-lint

increment-decrement: should replace sequence += 1 with sequence++ (revive)
}
}
&suite.Suite, addr,
[]byte(fmt.Sprintf(`{"get_count": {"addr": "%s"}}`, addr)))
suite.Require().Equal(`{"count":2}`, state)

Check failure on line 461 in tests/ibc-hooks/ibc_middleware_test.go

GitHub Actions / golangci-lint

File is not `gofumpt`-ed (gofumpt)
}
func (suite *HooksTestSuite) TestTimeouts() {
&suite.Suite, addr,
[]byte(fmt.Sprintf(`{"get_count": {"addr": "%s"}}`, addr)))
suite.Require().Equal(`{"count":10}`, state)

Check failure on line 494 in tests/ibc-hooks/ibc_middleware_test.go

GitHub Actions / golangci-lint

File is not `gofumpt`-ed (gofumpt)
}
func (suite *HooksTestSuite) TestSendWithoutMemo() {
suite.Require().NoError(err)
err = suite.path.EndpointB.UpdateClient()
suite.Require().NoError(err)

Check failure on line 533 in tests/ibc-hooks/ibc_middleware_test.go

GitHub Actions / golangci-lint

File is not `gofumpt`-ed (gofumpt)
}
func (suite *HooksTestSuite) GetChain(name Chain) *terraibctesting.TestChain {
if name == ChainA {
return suite.chainA
} else {

Check warning on line 539 in tests/ibc-hooks/ibc_middleware_test.go

GitHub Actions / golangci-lint

indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (revive)
return suite.chainB
}
}
return string(state)
}
func (chain *TestChain) QueryContractJson(suite *suite.Suite, contract sdk.AccAddress, key []byte) gjson.Result {

Check warning on line 70 in tests/terraibctesting/wasm.go

GitHub Actions / golangci-lint

var-naming: method QueryContractJson should be QueryContractJSON (revive)
terraApp := chain.GetTerraApp()
state, err := terraApp.WasmKeeper.QuerySmart(chain.GetContext(), contract, key)
suite.Require().NoError(err)
tmtypes "github.com/tendermint/tendermint/types"
)
var defaultGenesisBz []byte

Check failure on line 27 in app/test_helpers.go

GitHub Actions / golangci-lint

var `defaultGenesisBz` is unused (unused)
func getDefaultGenesisStateBytes() []byte {

Check failure on line 29 in app/test_helpers.go

GitHub Actions / golangci-lint

func `getDefaultGenesisStateBytes` is unused (unused)
if len(defaultGenesisBz) == 0 {
genesisState := NewDefaultGenesisState()
stateBytes, err := json.MarshalIndent(genesisState, "", " ")