Skip to content

Commit

Permalink
still doesnt work
Browse files Browse the repository at this point in the history
  • Loading branch information
okdas committed Oct 8, 2024
1 parent d578ac7 commit 93ab480
Show file tree
Hide file tree
Showing 35 changed files with 41 additions and 33 deletions.
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ require (
github.com/cosmos/ibc-go/v8 v8.2.0
github.com/go-kit/kit v0.13.0
github.com/gogo/status v1.1.0
github.com/golang/mock v1.6.0
github.com/golang/protobuf v1.5.4
github.com/gorilla/mux v1.8.1
github.com/gorilla/websocket v1.5.3
Expand Down Expand Up @@ -82,6 +81,7 @@ require (
require (
cosmossdk.io/x/tx v0.13.5
github.com/jhump/protoreflect v1.16.0
go.uber.org/mock v0.4.0
)

require (
Expand Down Expand Up @@ -178,6 +178,7 @@ require (
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v1.2.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/cel-go v0.20.1 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1217,6 +1217,8 @@ go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
Expand Down
2 changes: 1 addition & 1 deletion pkg/client/block/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
coretypes "github.com/cometbft/cometbft/rpc/core/types"
rpctypes "github.com/cometbft/cometbft/rpc/jsonrpc/types"
"github.com/cometbft/cometbft/types"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/pkg/client"
"github.com/pokt-network/poktroll/pkg/client/block"
Expand Down
2 changes: 1 addition & 1 deletion pkg/client/events/query_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"testing"
"time"

"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/pkg/client/events"
"github.com/pokt-network/poktroll/pkg/client/events/websocket"
Expand Down
2 changes: 1 addition & 1 deletion pkg/client/supplier/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"time"

"cosmossdk.io/depinject"
"github.com/golang/mock/gomock"
"github.com/pokt-network/smt"
"github.com/pokt-network/smt/kvstore/pebble"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/pkg/client/keyring"
"github.com/pokt-network/poktroll/pkg/client/supplier"
Expand Down
2 changes: 1 addition & 1 deletion pkg/client/tx/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
rpctypes "github.com/cometbft/cometbft/rpc/jsonrpc/types"
cosmoskeyring "github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/cosmos/cosmos-sdk/types"
"github.com/golang/mock/gomock"
"github.com/pokt-network/smt"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/pkg/client"
"github.com/pokt-network/poktroll/pkg/client/keyring"
Expand Down
2 changes: 1 addition & 1 deletion pkg/relayer/session/session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
coretypes "github.com/cometbft/cometbft/rpc/core/types"
cmttypes "github.com/cometbft/cometbft/types"
sdktypes "github.com/cosmos/cosmos-sdk/types"
"github.com/golang/mock/gomock"
"github.com/pokt-network/smt"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/app/volatile"
"github.com/pokt-network/poktroll/pkg/client"
Expand Down
2 changes: 1 addition & 1 deletion testutil/keeper/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
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"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/testutil/application/mocks"
testsession "github.com/pokt-network/poktroll/testutil/session"
Expand Down
2 changes: 1 addition & 1 deletion testutil/keeper/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
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"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

mocks "github.com/pokt-network/poktroll/testutil/gateway/mocks"
"github.com/pokt-network/poktroll/x/gateway/keeper"
Expand Down
2 changes: 1 addition & 1 deletion testutil/keeper/proof.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/app"
"github.com/pokt-network/poktroll/testutil/proof/mocks"
Expand Down
2 changes: 1 addition & 1 deletion testutil/keeper/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
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"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/testutil/service/mocks"
"github.com/pokt-network/poktroll/x/service/keeper"
Expand Down
2 changes: 1 addition & 1 deletion testutil/keeper/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
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"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/testutil/sample"
"github.com/pokt-network/poktroll/testutil/session/mocks"
Expand Down
2 changes: 1 addition & 1 deletion testutil/keeper/supplier.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
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"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/testutil/supplier/mocks"
servicekeeper "github.com/pokt-network/poktroll/x/service/keeper"
Expand Down
2 changes: 1 addition & 1 deletion testutil/keeper/tokenomics.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/app"
"github.com/pokt-network/poktroll/testutil/sample"
Expand Down
6 changes: 6 additions & 0 deletions testutil/mockclient/mocks.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
package mockclient

import (
// Fix for: cannot find module providing package go.uber.org/mock/mockgen/model: import lookup disabled by -mod=vendor
// More info: https://github.com/uber-go/mock/issues/83#issuecomment-1931054917
_ "go.uber.org/mock/mockgen/model"
)

// This file is in place to declare the package for dynamically generated structs.
//
// Note that this does not follow the Cosmos SDK pattern of committing Mocks to main.
Expand Down
2 changes: 1 addition & 1 deletion testutil/testclient/testblock/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"cosmossdk.io/depinject"
"github.com/cometbft/cometbft/types"
sdkclient "github.com/cosmos/cosmos-sdk/client"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/pkg/client"
"github.com/pokt-network/poktroll/pkg/client/block"
Expand Down
2 changes: 1 addition & 1 deletion testutil/testclient/testdelegation/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"cosmossdk.io/depinject"
"github.com/cometbft/cometbft/libs/json"
rpctypes "github.com/cometbft/cometbft/rpc/jsonrpc/types"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/pkg/client"
"github.com/pokt-network/poktroll/pkg/client/delegation"
Expand Down
2 changes: 1 addition & 1 deletion testutil/testclient/testeventsquery/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"time"

cosmoskeyring "github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/golang/mock/gomock"
"github.com/regen-network/gocuke"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/pkg/client"
"github.com/pokt-network/poktroll/pkg/client/events"
Expand Down
2 changes: 1 addition & 1 deletion testutil/testclient/testeventsquery/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"sync/atomic"
"testing"

"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/pkg/either"
"github.com/pokt-network/poktroll/testutil/mockclient"
Expand Down
2 changes: 1 addition & 1 deletion testutil/testclient/testqueryclients/accquerier.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
"github.com/cosmos/cosmos-sdk/types"
accounttypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/pkg/client/query"
"github.com/pokt-network/poktroll/testutil/mockclient"
Expand Down
2 changes: 1 addition & 1 deletion testutil/testclient/testqueryclients/appquerier.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"cosmossdk.io/math"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/testutil/mockclient"
apptypes "github.com/pokt-network/poktroll/x/application/types"
Expand Down
2 changes: 1 addition & 1 deletion testutil/testclient/testqueryclients/bankquerier.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"cosmossdk.io/math"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/app/volatile"
"github.com/pokt-network/poktroll/testutil/mockclient"
Expand Down
2 changes: 1 addition & 1 deletion testutil/testclient/testqueryclients/proofquerier.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package testqueryclients
import (
"testing"

"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/pkg/client"
"github.com/pokt-network/poktroll/testutil/mockclient"
Expand Down
2 changes: 1 addition & 1 deletion testutil/testclient/testqueryclients/servicequerier.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"testing"

"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/testutil/mockclient"
prooftypes "github.com/pokt-network/poktroll/x/proof/types"
Expand Down
2 changes: 1 addition & 1 deletion testutil/testclient/testqueryclients/sessionquerier.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"testing"

"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/testutil/mockclient"
testsession "github.com/pokt-network/poktroll/testutil/session"
Expand Down
2 changes: 1 addition & 1 deletion testutil/testclient/testqueryclients/sharedquerier.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"testing"

"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/testutil/mockclient"
"github.com/pokt-network/poktroll/x/shared"
Expand Down
2 changes: 1 addition & 1 deletion testutil/testclient/testqueryclients/supplierquerier.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"errors"
"testing"

"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/testutil/mockclient"
sharedtypes "github.com/pokt-network/poktroll/x/shared/types"
Expand Down
2 changes: 1 addition & 1 deletion testutil/testclient/testqueryclients/tokenomicsquerier.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"testing"

"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/testutil/mockclient"
tokenomicstypes "github.com/pokt-network/poktroll/x/tokenomics/types"
Expand Down
2 changes: 1 addition & 1 deletion testutil/testclient/testsupplier/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

"cosmossdk.io/depinject"
cosmostypes "github.com/cosmos/cosmos-sdk/types"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/pkg/client"
"github.com/pokt-network/poktroll/pkg/client/supplier"
Expand Down
2 changes: 1 addition & 1 deletion testutil/testclient/testtx/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"cosmossdk.io/depinject"
cosmostypes "github.com/cosmos/cosmos-sdk/types"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/pkg/client"
"github.com/pokt-network/poktroll/pkg/client/tx"
Expand Down
2 changes: 1 addition & 1 deletion testutil/testclient/testtx/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
cosmostx "github.com/cosmos/cosmos-sdk/client/tx"
cosmoskeyring "github.com/cosmos/cosmos-sdk/crypto/keyring"
cosmostypes "github.com/cosmos/cosmos-sdk/types"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/pkg/client"
"github.com/pokt-network/poktroll/pkg/client/tx"
Expand Down
2 changes: 1 addition & 1 deletion testutil/testrelayer/miner.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"testing"

"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/pkg/relayer"
"github.com/pokt-network/poktroll/testutil/mockrelayer"
Expand Down
2 changes: 1 addition & 1 deletion testutil/testrelayer/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"testing"

"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/pkg/relayer"
"github.com/pokt-network/poktroll/testutil/mockrelayer"
Expand Down
2 changes: 1 addition & 1 deletion testutil/testrelayer/sessions_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"testing"

"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

"github.com/pokt-network/poktroll/pkg/relayer"
"github.com/pokt-network/poktroll/testutil/mockrelayer"
Expand Down
1 change: 0 additions & 1 deletion x/tokenomics/types/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 93ab480

Please sign in to comment.