Skip to content

Commit

Permalink
[CORE-567] add integration tests for vest module gov msgs (#464)
Browse files Browse the repository at this point in the history
* add integration tests for vest module governance messages
  • Loading branch information
tqin7 authored Nov 7, 2023
1 parent 51aca39 commit 05799a4
Show file tree
Hide file tree
Showing 6 changed files with 521 additions and 1 deletion.
2 changes: 2 additions & 0 deletions protocol/testing/e2e/gov/add_new_market_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func TestAddNewMarketProposal(t *testing.T) {
tests := map[string]struct {
proposedMsgs []sdk.Msg
updateClobDelayBlocks uint32
expectCheckTxFails bool
expectSubmitProposalFail bool
expectDelayedUpdateClobPairMsgFailure bool
expectedProposalStatus govtypesv1.ProposalStatus
Expand Down Expand Up @@ -284,6 +285,7 @@ func TestAddNewMarketProposal(t *testing.T) {
ctx,
tApp,
tc.proposedMsgs,
tc.expectCheckTxFails,
tc.expectSubmitProposalFail,
tc.expectedProposalStatus,
)
Expand Down
6 changes: 6 additions & 0 deletions protocol/testing/e2e/gov/bridge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func TestUpdateEventParams(t *testing.T) {

tests := map[string]struct {
msg *bridgetypes.MsgUpdateEventParams
expectCheckTxFails bool
expectSubmitProposalFail bool
expectedProposalStatus govtypesv1.ProposalStatus
}{
Expand Down Expand Up @@ -65,6 +66,7 @@ func TestUpdateEventParams(t *testing.T) {
ctx,
tApp,
[]sdk.Msg{tc.msg},
tc.expectCheckTxFails,
tc.expectSubmitProposalFail,
tc.expectedProposalStatus,
)
Expand All @@ -83,6 +85,7 @@ func TestUpdateProposeParams(t *testing.T) {

tests := map[string]struct {
msg *bridgetypes.MsgUpdateProposeParams
expectCheckTxFails bool
expectSubmitProposalFail bool
expectedProposalStatus govtypesv1.ProposalStatus
}{
Expand Down Expand Up @@ -132,6 +135,7 @@ func TestUpdateProposeParams(t *testing.T) {
ctx,
tApp,
[]sdk.Msg{tc.msg},
tc.expectCheckTxFails,
tc.expectSubmitProposalFail,
tc.expectedProposalStatus,
)
Expand All @@ -150,6 +154,7 @@ func TestUpdateSafetyParams(t *testing.T) {

tests := map[string]struct {
msg *bridgetypes.MsgUpdateSafetyParams
expectCheckTxFails bool
expectSubmitProposalFail bool
expectedProposalStatus govtypesv1.ProposalStatus
}{
Expand Down Expand Up @@ -195,6 +200,7 @@ func TestUpdateSafetyParams(t *testing.T) {
ctx,
tApp,
[]sdk.Msg{tc.msg},
tc.expectCheckTxFails,
tc.expectSubmitProposalFail,
tc.expectedProposalStatus,
)
Expand Down
2 changes: 2 additions & 0 deletions protocol/testing/e2e/gov/sending_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func TestSendFromModuleToAccount(t *testing.T) {
tests := map[string]struct {
msg *sendingtypes.MsgSendFromModuleToAccount
initialModuleBalance int64
expectCheckTxFails bool
expectedProposalStatus govtypesv1.ProposalStatus
expectSubmitProposalFail bool
}{
Expand Down Expand Up @@ -104,6 +105,7 @@ func TestSendFromModuleToAccount(t *testing.T) {
ctx,
tApp,
[]sdk.Msg{tc.msg},
tc.expectCheckTxFails,
tc.expectSubmitProposalFail,
tc.expectedProposalStatus,
)
Expand Down
2 changes: 2 additions & 0 deletions protocol/testing/e2e/gov/stats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
func TestUpdateParams(t *testing.T) {
tests := map[string]struct {
msg *statstypes.MsgUpdateParams
expectCheckTxFails bool
expectedProposalStatus govtypesv1.ProposalStatus
expectSubmitProposalFail bool
}{
Expand Down Expand Up @@ -70,6 +71,7 @@ func TestUpdateParams(t *testing.T) {
ctx,
tApp,
[]sdk.Msg{tc.msg},
tc.expectCheckTxFails,
tc.expectSubmitProposalFail,
tc.expectedProposalStatus,
)
Expand Down
Loading

0 comments on commit 05799a4

Please sign in to comment.