Skip to content

Commit

Permalink
Fix failing e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
bermuell committed Aug 7, 2023
1 parent c0d8314 commit d2d9459
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion tests/e2e/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -1819,8 +1819,9 @@ type assignConsumerPubKeyAction struct {
func (tr TestRun) assignConsumerPubKey(action assignConsumerPubKeyAction, verbose bool) {
valCfg := tr.validatorConfigs[action.validator]

// Note: to get error response reported back from this command '--gas auto' needs to be set.
assignKey := fmt.Sprintf(
`%s tx provider assign-consensus-key %s '%s' --from validator%s --chain-id %s --home %s --node %s --gas 90000 --keyring-backend test -y -o json`,
`%s tx provider assign-consensus-key %s '%s' --from validator%s --chain-id %s --home %s --node %s --gas auto --keyring-backend test -y -o json`,
tr.chainConfigs[chainID("provi")].binaryName,
string(tr.chainConfigs[action.chain].chainId),
action.consumerPubkey,
Expand All @@ -1847,6 +1848,10 @@ func (tr TestRun) assignConsumerPubKey(action assignConsumerPubKeyAction, verbos
}

if action.expectError {
if err == nil {
log.Fatalf("expected error not raised: %s", string(bz))
}

if verbose {
fmt.Printf("got expected error during key assignment | err: %s \n", err.Error())
}
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

var (
verbose = flag.Bool("verbose", false, "turn verbose logging on/off")
happyPathOnly = flag.Bool("happy-path-only", false, "run happy path tests only")
hanppyPathOnly = flag.Bool("happy-path-only", false, "run happy path tests only")
shortHappyPathOnly = flag.Bool("short-happy-path", false, `run abridged happy path tests only.
This is like the happy path, but skips steps
that involve starting or stopping nodes for the same chain outside of the chain setup or teardown.
Expand Down Expand Up @@ -49,7 +49,7 @@ func main() {
return
}

if happyPathOnly != nil && *happyPathOnly {
if hanppyPathOnly != nil && *hanppyPathOnly {
fmt.Println("=============== running happy path only ===============")
tr := DefaultTestRun()
tr.Run(happyPathSteps, *localSdkPath, *useGaia, *gaiaTag)
Expand Down

0 comments on commit d2d9459

Please sign in to comment.