Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrit committed May 7, 2024
1 parent 86340b6 commit 5c9465c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
6 changes: 3 additions & 3 deletions x/auction/client/cli/tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import (
"os"
"testing"

"github.com/cosmos/cosmos-sdk/testutil"
"github.com/peggyjv/sommelier/v7/x/auction/types"

"github.com/cosmos/cosmos-sdk/testutil"
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
"github.com/stretchr/testify/require"
)

func TestParseSetTokenPricesProposal(t *testing.T) {
encodingConfig := testutil.TestEncodingConfig()
encodingConfig := moduletestutil.MakeTestEncodingConfig()

okJSON := testutil.WriteToNewTempFile(t, `
{
Expand All @@ -33,7 +33,7 @@ func TestParseSetTokenPricesProposal(t *testing.T) {

require.Equal(t, "My token proposal", proposal.Title)
require.Equal(t, "Contains a usomm price update", proposal.Description)
require.Equal(t, "denom:\"usomm\" exponent:\"6\" usd_price:\"4200000000000000000\" ", proposal.TokenPrices[0].String())
require.Equal(t, "denom:\"usomm\" exponent:6 usd_price:\"4200000000000000000\" ", proposal.TokenPrices[0].String())
require.Equal(t, "10000usomm", proposal.Deposit)
}

Expand Down
17 changes: 9 additions & 8 deletions x/axelarcork/client/cli/tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ import (
"github.com/peggyjv/sommelier/v7/x/axelarcork/types"

"github.com/cosmos/cosmos-sdk/testutil"
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
"github.com/stretchr/testify/require"
)

func TestParseAddManagedCellarsProposal(t *testing.T) {
encodingConfig := testutil.TestEncodingConfig()
encodingConfig := moduletestutil.MakeTestEncodingConfig()

okJSON := testutil.WriteToNewTempFile(t, `
{
Expand Down Expand Up @@ -42,7 +43,7 @@ func TestParseAddManagedCellarsProposal(t *testing.T) {
}

func TestParseRemoveManagedCellarsProposal(t *testing.T) {
encodingConfig := testutil.TestEncodingConfig()
encodingConfig := moduletestutil.MakeTestEncodingConfig()

okJSON := testutil.WriteToNewTempFile(t, `
{
Expand Down Expand Up @@ -70,7 +71,7 @@ func TestParseRemoveManagedCellarsProposal(t *testing.T) {
}

func TestParseSubmitScheduledCorkProposal(t *testing.T) {
encodingConfig := testutil.TestEncodingConfig()
encodingConfig := moduletestutil.MakeTestEncodingConfig()

okJSON := testutil.WriteToNewTempFile(t, `
{
Expand Down Expand Up @@ -103,7 +104,7 @@ func TestParseSubmitScheduledCorkProposal(t *testing.T) {
}

func TestParseAxelarCommunityPoolSpendProposal(t *testing.T) {
encodingConfig := testutil.TestEncodingConfig()
encodingConfig := moduletestutil.MakeTestEncodingConfig()

okJSON := testutil.WriteToNewTempFile(t, `
{
Expand Down Expand Up @@ -132,7 +133,7 @@ func TestParseAxelarCommunityPoolSpendProposal(t *testing.T) {
}

func TestParseAddChainConfigurationProposal(t *testing.T) {
encodingConfig := testutil.TestEncodingConfig()
encodingConfig := moduletestutil.MakeTestEncodingConfig()

okJSON := testutil.WriteToNewTempFile(t, `
{
Expand Down Expand Up @@ -171,7 +172,7 @@ func TestParseAddChainConfigurationProposal(t *testing.T) {
}

func TestParseRemoveChainConfigurationProposal(t *testing.T) {
encodingConfig := testutil.TestEncodingConfig()
encodingConfig := moduletestutil.MakeTestEncodingConfig()

okJSON := testutil.WriteToNewTempFile(t, `
{
Expand All @@ -196,7 +197,7 @@ func TestParseRemoveChainConfigurationProposal(t *testing.T) {
}

func TestParseUpgradeAxelarProxyContractProposal(t *testing.T) {
encodingConfig := testutil.TestEncodingConfig()
encodingConfig := moduletestutil.MakeTestEncodingConfig()

okJSON := testutil.WriteToNewTempFile(t, `
{
Expand All @@ -223,7 +224,7 @@ func TestParseUpgradeAxelarProxyContractProposal(t *testing.T) {
}

func TestParseCancelAxelarProxyContractUpgradeProposal(t *testing.T) {
encodingConfig := testutil.TestEncodingConfig()
encodingConfig := moduletestutil.MakeTestEncodingConfig()

okJSON := testutil.WriteToNewTempFile(t, `
{
Expand Down
7 changes: 4 additions & 3 deletions x/cork/client/cli/tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import (
types "github.com/peggyjv/sommelier/v7/x/cork/types/v2"

"github.com/cosmos/cosmos-sdk/testutil"
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
"github.com/stretchr/testify/require"
)

func TestParseAddManagedCellarsProposal(t *testing.T) {
encodingConfig := testutil.TestEncodingConfig()
encodingConfig := moduletestutil.MakeTestEncodingConfig()

okJSON := testutil.WriteToNewTempFile(t, `
{
Expand Down Expand Up @@ -39,7 +40,7 @@ func TestParseAddManagedCellarsProposal(t *testing.T) {
}

func TestParseRemoveManagedCellarsProposal(t *testing.T) {
encodingConfig := testutil.TestEncodingConfig()
encodingConfig := moduletestutil.MakeTestEncodingConfig()

okJSON := testutil.WriteToNewTempFile(t, `
{
Expand All @@ -65,7 +66,7 @@ func TestParseRemoveManagedCellarsProposal(t *testing.T) {
}

func TestParseSubmitScheduledCorkProposal(t *testing.T) {
encodingConfig := testutil.TestEncodingConfig()
encodingConfig := moduletestutil.MakeTestEncodingConfig()

okJSON := testutil.WriteToNewTempFile(t, `
{
Expand Down

0 comments on commit 5c9465c

Please sign in to comment.