Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
fynnss committed Aug 3, 2023
1 parent 47337c7 commit 9989e21
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 21 deletions.
5 changes: 3 additions & 2 deletions app/export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package app_test
import (
"testing"

"github.com/bnb-chain/greenfield/sdk/client/test"
"github.com/bnb-chain/greenfield/testutil"
dbm "github.com/cometbft/cometbft-db"
"github.com/cometbft/cometbft/libs/log"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"

"github.com/bnb-chain/greenfield/sdk/client/test"
"github.com/bnb-chain/greenfield/testutil"
)

func TestExportAppStateAndValidators(t *testing.T) {
Expand Down
9 changes: 5 additions & 4 deletions e2e/tests/permission_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@ import (
"time"

sdkmath "cosmossdk.io/math"
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"

sdktype "github.com/bnb-chain/greenfield/sdk/types"
storageutil "github.com/bnb-chain/greenfield/testutil/storage"
types2 "github.com/bnb-chain/greenfield/types"
"github.com/bnb-chain/greenfield/types/common"
"github.com/bnb-chain/greenfield/types/resource"
"github.com/bnb-chain/greenfield/x/permission/types"
storagetypes "github.com/bnb-chain/greenfield/x/storage/types"
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
)

func (s *StorageTestSuite) TestDeleteBucketPermission() {
Expand Down
4 changes: 2 additions & 2 deletions internal/sequence/sequence.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ type Number interface {
uint32 | math.Uint
}

type Sequence[T Number] struct {
type Sequence struct {
storeKey []byte
}

func NewSequence[T Number](prefix []byte) Sequence[T] {
func NewSequence(prefix []byte) Sequence[T] {

Check failure on line 23 in internal/sequence/sequence.go

View workflow job for this annotation

GitHub Actions / tests (1.20.x, ubuntu-latest)

invalid operation: Sequence[T] (Sequence is not a generic type)

Check failure on line 23 in internal/sequence/sequence.go

View workflow job for this annotation

GitHub Actions / build-test (1.20.x, ubuntu-latest)

invalid operation: Sequence[T] (Sequence is not a generic type)

Check failure on line 23 in internal/sequence/sequence.go

View workflow job for this annotation

GitHub Actions / golangci-lint (1.20.x, ubuntu-latest)

invalid operation: Sequence[T] (Sequence is not a generic type)
return Sequence[T]{

Check failure on line 24 in internal/sequence/sequence.go

View workflow job for this annotation

GitHub Actions / tests (1.20.x, ubuntu-latest)

invalid operation: Sequence[T] (Sequence is not a generic type)

Check failure on line 24 in internal/sequence/sequence.go

View workflow job for this annotation

GitHub Actions / build-test (1.20.x, ubuntu-latest)

invalid operation: Sequence[T] (Sequence is not a generic type)

Check failure on line 24 in internal/sequence/sequence.go

View workflow job for this annotation

GitHub Actions / golangci-lint (1.20.x, ubuntu-latest)

invalid operation: Sequence[T] (Sequence is not a generic type)
storeKey: prefix,
}
Expand Down
4 changes: 2 additions & 2 deletions x/bridge/client/cli/tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import (
abci "github.com/cometbft/cometbft/abci/types"
rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/cosmos/cosmos-sdk/testutil"
clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/suite"
Expand All @@ -19,8 +21,6 @@ import (
"github.com/bnb-chain/greenfield/sdk/client/test"
"github.com/bnb-chain/greenfield/testutil/sample"
"github.com/bnb-chain/greenfield/x/bridge/client/cli"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/testutil"
)

type CLITestSuite struct {
Expand Down
2 changes: 1 addition & 1 deletion x/challenge/client/cli/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package cli_test
import (
"fmt"

"github.com/cosmos/cosmos-sdk/client/flags"
clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli"
"github.com/cosmos/gogoproto/proto"

"github.com/bnb-chain/greenfield/x/challenge/client/cli"
"github.com/bnb-chain/greenfield/x/challenge/types"
"github.com/cosmos/cosmos-sdk/client/flags"
)

func (s *CLITestSuite) TestQueryCmd() {
Expand Down
2 changes: 1 addition & 1 deletion x/payment/client/cli/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package cli_test
import (
"fmt"

"github.com/cosmos/cosmos-sdk/client/flags"
clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli"
"github.com/cosmos/gogoproto/proto"

"github.com/bnb-chain/greenfield/testutil/sample"
"github.com/bnb-chain/greenfield/x/payment/client/cli"
"github.com/bnb-chain/greenfield/x/payment/types"
"github.com/cosmos/cosmos-sdk/client/flags"
)

func (s *CLITestSuite) TestQueryCmd() {
Expand Down
2 changes: 1 addition & 1 deletion x/permission/client/cli/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package cli_test
import (
"fmt"

"github.com/cosmos/cosmos-sdk/client/flags"
clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli"
"github.com/cosmos/gogoproto/proto"

"github.com/bnb-chain/greenfield/x/payment/client/cli"
"github.com/bnb-chain/greenfield/x/payment/types"
"github.com/cosmos/cosmos-sdk/client/flags"
)

func (s *CLITestSuite) TestQueryCmd() {
Expand Down
9 changes: 5 additions & 4 deletions x/permission/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import (
"fmt"

"cosmossdk.io/math"
"github.com/bnb-chain/greenfield/internal/sequence"
"github.com/bnb-chain/greenfield/types/resource"
"github.com/bnb-chain/greenfield/x/permission/types"
storagetypes "github.com/bnb-chain/greenfield/x/storage/types"
"github.com/cometbft/cometbft/libs/log"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/store/prefix"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/bnb-chain/greenfield/internal/sequence"
"github.com/bnb-chain/greenfield/types/resource"
"github.com/bnb-chain/greenfield/x/permission/types"
storagetypes "github.com/bnb-chain/greenfield/x/storage/types"
)

type (
Expand Down
2 changes: 1 addition & 1 deletion x/sp/client/cli/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package cli_test
import (
"fmt"

"github.com/cosmos/cosmos-sdk/client/flags"
clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli"
"github.com/cosmos/gogoproto/proto"

"github.com/bnb-chain/greenfield/testutil/sample"
"github.com/bnb-chain/greenfield/x/sp/client/cli"
"github.com/bnb-chain/greenfield/x/sp/types"
"github.com/cosmos/cosmos-sdk/client/flags"
)

func (s *CLITestSuite) TestQueryCmd() {
Expand Down
2 changes: 1 addition & 1 deletion x/storage/client/cli/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package cli_test
import (
"fmt"

"github.com/cosmos/cosmos-sdk/client/flags"
clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli"
"github.com/cosmos/gogoproto/proto"

"github.com/bnb-chain/greenfield/testutil/sample"
"github.com/bnb-chain/greenfield/x/storage/client/cli"
"github.com/bnb-chain/greenfield/x/storage/types"
"github.com/cosmos/cosmos-sdk/client/flags"
)

func (s *CLITestSuite) TestQueryCmd() {
Expand Down
4 changes: 3 additions & 1 deletion x/storage/keeper/keeper_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package keeper_test

import "github.com/bnb-chain/greenfield/testutil/sample"
import (
"github.com/bnb-chain/greenfield/testutil/sample"
)

func (s *TestSuite) TestClearDiscontinueBucketCount() {
acc1 := sample.RandAccAddress()
Expand Down
2 changes: 1 addition & 1 deletion x/virtualgroup/client/cli/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package cli_test
import (
"fmt"

"github.com/cosmos/cosmos-sdk/client/flags"
clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli"
"github.com/cosmos/gogoproto/proto"

"github.com/bnb-chain/greenfield/x/virtualgroup/client/cli"
"github.com/bnb-chain/greenfield/x/virtualgroup/types"
"github.com/cosmos/cosmos-sdk/client/flags"
)

func (s *CLITestSuite) TestQueryCmd() {
Expand Down

0 comments on commit 9989e21

Please sign in to comment.