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

ci: actually enable v2 system test #21539

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 9 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
5 changes: 2 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ jobs:
path: ./tests/e2e-profile.out

test-system:
needs: [tests, test-integration, test-e2e]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -177,7 +176,7 @@ jobs:
- name: system tests v1
if: env.GIT_DIFF
run: |
COSMOS_BUILD_OPTIONS=legacy make test-system
make test-system
- uses: actions/upload-artifact@v3
if: failure()
with:
Expand All @@ -187,7 +186,7 @@ jobs:
- name: system tests v2
if: env.GIT_DIFF
run: |
make test-system
COSMOS_BUILD_OPTIONS=v2 make test-system
- uses: actions/upload-artifact@v3
if: failure()
with:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include scripts/build/build.mk

.DEFAULT_GOAL := help

#? go.sum: Run go mod tidy and ensure dependencies have not been modified
#? go.sum: Run go mod tidy and ensure dependencies have not been modified.
go.sum: go.mod
echo "Ensure dependencies have not been modified ..." >&2
go mod verify
Expand Down
2 changes: 1 addition & 1 deletion client/grpc/cmtservice/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

func TestStatusCommand(t *testing.T) {
t.Skip() // https://github.com/cosmos/cosmos-sdk/issues/17446
t.Skip() // Rewrite as system test

cfg, err := network.DefaultConfigWithAppConfig(depinject.Configs() /* TODO, test skipped anyway */)
require.NoError(t, err)
Expand Down
2 changes: 0 additions & 2 deletions client/v2/autocli/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,6 @@ func TestBinaryFlag(t *testing.T) {
}

func TestAddressValidation(t *testing.T) {
t.Skip() // TODO(@julienrbrt) re-able with better keyring instiantiation

fixture := initFixture(t)

_, err := runCmd(fixture, buildModuleQueryCommand,
Expand Down
17 changes: 0 additions & 17 deletions scripts/local-testnet.sh

This file was deleted.

21 changes: 18 additions & 3 deletions tests/systemtests/testnet_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ import (
"github.com/creachadair/tomledit/parser"
)

// isV2 checks if the tests run with simapp v2
func isV2() bool {
buildOptions := os.Getenv("COSMOS_BUILD_OPTIONS")
return strings.Contains(buildOptions, "v2")
}

// SingleHostTestnetCmdInitializer default testnet cmd that supports the --single-host param
type SingleHostTestnetCmdInitializer struct {
execBinary string
Expand Down Expand Up @@ -53,10 +59,16 @@ func (s SingleHostTestnetCmdInitializer) Initialize() {
"--output-dir=" + s.outputDir,
"--validator-count=" + strconv.Itoa(s.initialNodesCount),
"--keyring-backend=test",
"--minimum-gas-prices=" + s.minGasPrice,
"--commit-timeout=" + s.commitTimeout.String(),
"--single-host",
}

if isV2() {
args = append(args, "--server.minimum-gas-prices="+s.minGasPrice)
} else {
args = append(args, "--minimum-gas-prices="+s.minGasPrice)
}

s.log(fmt.Sprintf("+++ %s %s\n", s.execBinary, strings.Join(args, " ")))
out, err := RunShellCmd(s.execBinary, args...)
if err != nil {
Expand Down Expand Up @@ -108,7 +120,11 @@ func (s ModifyConfigYamlInitializer) Initialize() {
"--output-dir=" + s.outputDir,
"--v=" + strconv.Itoa(s.initialNodesCount),
"--keyring-backend=test",
"--minimum-gas-prices=" + s.minGasPrice,
}
if isV2() {
args = append(args, "--server.minimum-gas-prices="+s.minGasPrice)
} else {
args = append(args, "--minimum-gas-prices="+s.minGasPrice)
}
s.log(fmt.Sprintf("+++ %s %s\n", s.execBinary, strings.Join(args, " ")))

Expand Down Expand Up @@ -144,7 +160,6 @@ func (s ModifyConfigYamlInitializer) Initialize() {
EditToml(filepath.Join(nodeDir, "app.toml"), func(doc *tomledit.Document) {
UpdatePort(doc, apiPortStart+i, "api", "address")
UpdatePort(doc, grpcPortStart+i, "grpc", "address")
SetBool(doc, true, "grpc-web", "enable")
})
}
}
Expand Down
3 changes: 2 additions & 1 deletion tests/systemtests/unordered_tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import (
)

func TestUnorderedTXDuplicate(t *testing.T) {
t.Skip("The unordered tx antehanlder is missing in v2")
t.Skip("The unordered tx handling is not wired in v2")

// scenario: test unordered tx duplicate
// given a running chain with a tx in the unordered tx pool
// when a new tx with the same hash is broadcasted
Expand Down
2 changes: 1 addition & 1 deletion x/auth/ante/basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func TestValidateMemo(t *testing.T) {
}

func TestConsumeGasForTxSize(t *testing.T) {
t.Skip() // TODO(@julienrbrt) Fix after https://github.com/cosmos/cosmos-sdk/pull/20072
t.Skip() // TO FIX BEFORE 0.52 FINAL.

suite := SetupTestSuite(t, true)

Expand Down
Loading