Skip to content

Commit

Permalink
use propID as uint64 for all test
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed May 4, 2024
1 parent 16d329f commit cd8c0ec
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion examples/cosmos/chain_core_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ func testGov(ctx context.Context, t *testing.T, chain *cosmos.CosmosChain, users
require.EqualValues(t, v.Options[0].Option, govv1.VoteOption_VOTE_OPTION_YES)

// pass vote with all validators
err = chain.VoteOnProposalAllValidators(ctx, "1", "yes")
err = chain.VoteOnProposalAllValidators(ctx, 1, "yes")
require.NoError(t, err)

// GovQueryProposalsV1
Expand Down
8 changes: 4 additions & 4 deletions examples/cosmos/chain_param_change_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ func CosmosChainParamChangeTest(t *testing.T, name, version string) {
paramTx, err := chain.ParamChangeProposal(ctx, chainUser.KeyName(), &param_change)
require.NoError(t, err, "error submitting param change proposal tx")

err = chain.VoteOnProposalAllValidators(ctx, paramTx.ProposalID, cosmos.ProposalVoteYes)
propId, err := strconv.ParseUint(paramTx.ProposalID, 10, 64)
require.NoError(t, err, "failed to convert proposal ID to uint64")

err = chain.VoteOnProposalAllValidators(ctx, propId, cosmos.ProposalVoteYes)
require.NoError(t, err, "failed to submit votes")

height, _ := chain.Height(ctx)

propId, err := strconv.ParseUint(paramTx.ProposalID, 10, 64)
require.NoError(t, err, "failed to convert proposal ID to uint64")

_, err = cosmos.PollForProposalStatus(ctx, chain, height, height+10, propId, govv1beta1.StatusPassed)
require.NoError(t, err, "proposal status did not change to passed in expected number of blocks")

Expand Down
6 changes: 3 additions & 3 deletions examples/cosmos/chain_upgrade_ibc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ func CosmosChainUpgradeIBCTest(t *testing.T, chainName, initialVersion, upgradeC
upgradeTx, err := chain.UpgradeProposal(ctx, chainUser.KeyName(), proposal)
require.NoError(t, err, "error submitting software upgrade proposal tx")

err = chain.VoteOnProposalAllValidators(ctx, upgradeTx.ProposalID, cosmos.ProposalVoteYes)
require.NoError(t, err, "failed to submit votes")

propId, err := strconv.ParseUint(upgradeTx.ProposalID, 10, 64)
require.NoError(t, err, "failed to convert proposal ID to uint64")

err = chain.VoteOnProposalAllValidators(ctx, propId, cosmos.ProposalVoteYes)
require.NoError(t, err, "failed to submit votes")

_, err = cosmos.PollForProposalStatus(ctx, chain, height, height+haltHeightDelta, propId, govv1beta1.StatusPassed)
require.NoError(t, err, "proposal status did not change to passed in expected number of blocks")

Expand Down
6 changes: 3 additions & 3 deletions examples/hyperspace/hyperspace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,12 @@ func pushWasmContractViaGov(t *testing.T, ctx context.Context, cosmosChain *cosm
height, err := cosmosChain.Height(ctx)
require.NoError(t, err, "error fetching height before submit upgrade proposal")

err = cosmosChain.VoteOnProposalAllValidators(ctx, proposalTx.ProposalID, cosmos.ProposalVoteYes)
require.NoError(t, err, "failed to submit votes")

propId, err := strconv.ParseUint(proposalTx.ProposalID, 10, 64)
require.NoError(t, err, "failed to convert proposal ID to uint64")

err = cosmosChain.VoteOnProposalAllValidators(ctx, propId, cosmos.ProposalVoteYes)
require.NoError(t, err, "failed to submit votes")

_, err = cosmos.PollForProposalStatus(ctx, cosmosChain, height, height+heightDelta, propId, govv1beta1.StatusPassed)
require.NoError(t, err, "proposal status did not change to passed in expected number of blocks")

Expand Down
6 changes: 3 additions & 3 deletions examples/polkadot/push_wasm_client_code_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@ func TestPushWasmClientCode(t *testing.T) {
height, err := simdChain.Height(ctx)
require.NoError(t, err, "error fetching height before submit upgrade proposal")

err = simdChain.VoteOnProposalAllValidators(ctx, proposalTx.ProposalID, cosmos.ProposalVoteYes)
require.NoError(t, err, "failed to submit votes")

propId, err := strconv.ParseUint(proposalTx.ProposalID, 10, 64)
require.NoError(t, err, "failed to convert proposal ID to uint64")

err = simdChain.VoteOnProposalAllValidators(ctx, propId, cosmos.ProposalVoteYes)
require.NoError(t, err, "failed to submit votes")

_, err = cosmos.PollForProposalStatus(ctx, simdChain, height, height+heightDelta, propId, govv1beta1.StatusPassed)
require.NoError(t, err, "proposal status did not change to passed in expected number of blocks")

Expand Down

0 comments on commit cd8c0ec

Please sign in to comment.