Skip to content

Commit

Permalink
chore: fix integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
Peartes committed Jan 15, 2025
1 parent 6ce7bb8 commit c1f0049
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions integration_tests/update_treasury_configs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,15 @@ func validateGrantConfigs(t *testing.T, ctx context.Context, xion *cosmos.Cosmos
require.NoError(t, err)

// Validate that all grants are in the contract state
require.Equal(t, 2, len(queriedGrantConfigUrls))
require.Equal(t, "/cosmos.bank.v1.MsgSend", queriedGrantConfigUrls[0])
require.Equal(t, "/cosmos.staking.v1.MsgDelegate", queriedGrantConfigUrls[1])
require.Equal(t, 3, len(queriedGrantConfigUrls))
check := []string{"/cosmos.bank.v1beta1.MsgSend", "/cosmos.staking.v1beta1.MsgDelegate", "/cosmos.gov.v1beta1.MsgVote"}
exists := make(map[string]bool)
for _, str := range queriedGrantConfigUrls {
exists[str] = true
}
for _, str := range check {
require.True(t, exists[str], "Expected %s to be in the grant config type URLs", str)
}
}

func validateFeeConfig(t *testing.T, ctx context.Context, xion *cosmos.CosmosChain, treasuryAddr string) {
Expand All @@ -171,7 +177,7 @@ func validateFeeConfig(t *testing.T, ctx context.Context, xion *cosmos.CosmosCha

// Validate Fee Config
require.Equal(t, "Fee allowance for user1", queriedFeeConfig.Description)
require.Equal(t, "/cosmos.feegrant.v1.BasicAllowance", queriedFeeConfig.Allowance.TypeURL)
require.Equal(t, "/cosmos.feegrant.v1beta1.AllowedMsgAllowance", queriedFeeConfig.Allowance.TypeURL)
}

func TestUpdateTreasuryConfigsWithAALocalAndURL(t *testing.T) {
Expand Down

0 comments on commit c1f0049

Please sign in to comment.