Skip to content

Commit

Permalink
merge commit
Browse files Browse the repository at this point in the history
  • Loading branch information
keruch committed Aug 5, 2024
1 parent 9c863be commit bd1a296
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
10 changes: 5 additions & 5 deletions x/sponsorship/types/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import (
"testing"

"cosmossdk.io/math"
"github.com/osmosis-labs/osmosis/v15/testutils/apptesting"
"github.com/stretchr/testify/require"

"github.com/dymensionxyz/dymension/v3/testutil/sample"
"github.com/dymensionxyz/dymension/v3/x/sponsorship/types"
)

func TestValidateGenesis(t *testing.T) {
addrs := sample.GenerateAddresses(3)
valAddrs := sample.GenerateAddresses(3)
addrs := accAddrsToString(apptesting.CreateRandomAccounts(3))
valAddrs := accAddrsToString(apptesting.CreateRandomAccounts(3))

tests := []struct {
name string
Expand Down Expand Up @@ -157,8 +157,8 @@ func TestValidateGenesis(t *testing.T) {
}

func TestValidateVoterInfo(t *testing.T) {
addrs := sample.GenerateAddresses(3)
valAddrs := sample.GenerateAddresses(3)
addrs := accAddrsToString(apptesting.CreateRandomAccounts(3))
valAddrs := accAddrsToString(apptesting.CreateRandomAccounts(3))

tests := []struct {
name string
Expand Down
6 changes: 3 additions & 3 deletions x/sponsorship/types/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/stretchr/testify/require"

"github.com/dymensionxyz/dymension/v3/testutil/sample"
"github.com/dymensionxyz/dymension/v3/app/apptesting"
"github.com/dymensionxyz/dymension/v3/x/sponsorship/types"
)

func TestMsgVote(t *testing.T) {
addrs := sample.GenerateAddresses(1)
addrs := accAddrsToString(apptesting.CreateRandomAccounts(1))

tests := []struct {
name string
Expand Down Expand Up @@ -79,7 +79,7 @@ func TestMsgVote(t *testing.T) {
}

func TestMsgRevokeVote(t *testing.T) {
addrs := sample.GenerateAddresses(1)
addrs := accAddrsToString(apptesting.CreateRandomAccounts(1))

tests := []struct {
name string
Expand Down
9 changes: 9 additions & 0 deletions x/sponsorship/types/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"testing"

"cosmossdk.io/math"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/require"

"github.com/dymensionxyz/dymension/v3/x/sponsorship/types"
Expand Down Expand Up @@ -645,3 +646,11 @@ func TestDistribution(t *testing.T) {
})
}
}

func accAddrsToString(a []sdk.AccAddress) []string {
res := make([]string, 0, len(a))
for _, addr := range a {
res = append(res, addr.String())
}
return res
}

0 comments on commit bd1a296

Please sign in to comment.