Skip to content

Commit

Permalink
v2 checks
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Sep 4, 2024
1 parent 95e845b commit a0772cb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
20 changes: 18 additions & 2 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
1 change: 0 additions & 1 deletion tests/systemtests/unordered_tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
)

func TestUnorderedTXDuplicate(t *testing.T) {
t.Skip("The unordered tx antehanlder is missing 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

0 comments on commit a0772cb

Please sign in to comment.