Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Testing] Unit tests, E2E tests, logging and other Fixes / "Touchups" #253

Merged
merged 21 commits into from
Dec 13, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Manually run the following command on the files provided: goimports-r…
…eviser -rm-unused -set-alias -format -output write
Olshansk committed Dec 12, 2023
commit 9228887a2590f25e08d724dee93a7df7443af4b6
3 changes: 2 additions & 1 deletion pkg/relayer/relayminer_test.go
Original file line number Diff line number Diff line change
@@ -6,12 +6,13 @@ import (
"time"

"cosmossdk.io/depinject"
"github.com/stretchr/testify/require"

"github.com/pokt-network/poktroll/pkg/observable/channel"
"github.com/pokt-network/poktroll/pkg/polylog/polyzero"
"github.com/pokt-network/poktroll/pkg/relayer"
"github.com/pokt-network/poktroll/testutil/testrelayer"
servicetypes "github.com/pokt-network/poktroll/x/service/types"
"github.com/stretchr/testify/require"
)

func TestRelayMiner_StartAndStop(t *testing.T) {
3 changes: 2 additions & 1 deletion x/application/keeper/msg_server_delegate_to_gateway_test.go
Original file line number Diff line number Diff line change
@@ -5,12 +5,13 @@ import (
"testing"

sdk "github.com/cosmos/cosmos-sdk/types"
Olshansk marked this conversation as resolved.
Show resolved Hide resolved
"github.com/stretchr/testify/require"

keepertest "github.com/pokt-network/poktroll/testutil/keeper"
"github.com/pokt-network/poktroll/testutil/sample"
"github.com/pokt-network/poktroll/x/application/keeper"
"github.com/pokt-network/poktroll/x/application/types"
sharedtypes "github.com/pokt-network/poktroll/x/shared/types"
"github.com/stretchr/testify/require"
)

func TestMsgServer_DelegateToGateway_SuccessfullyDelegate(t *testing.T) {
Original file line number Diff line number Diff line change
@@ -5,12 +5,13 @@ import (
"testing"

sdk "github.com/cosmos/cosmos-sdk/types"
Olshansk marked this conversation as resolved.
Show resolved Hide resolved
"github.com/stretchr/testify/require"

keepertest "github.com/pokt-network/poktroll/testutil/keeper"
"github.com/pokt-network/poktroll/testutil/sample"
"github.com/pokt-network/poktroll/x/application/keeper"
"github.com/pokt-network/poktroll/x/application/types"
sharedtypes "github.com/pokt-network/poktroll/x/shared/types"
"github.com/stretchr/testify/require"
)

func TestMsgServer_UndelegateFromGateway_SuccessfullyUndelegate(t *testing.T) {
3 changes: 2 additions & 1 deletion x/supplier/client/cli/helpers_test.go
Original file line number Diff line number Diff line change
@@ -17,6 +17,8 @@ import (
"github.com/cosmos/cosmos-sdk/crypto/keyring"
testcli "github.com/cosmos/cosmos-sdk/testutil/cli"
sdktypes "github.com/cosmos/cosmos-sdk/types"
Olshansk marked this conversation as resolved.
Show resolved Hide resolved
"github.com/stretchr/testify/require"

"github.com/pokt-network/poktroll/cmd/pocketd/cmd"
"github.com/pokt-network/poktroll/testutil/network"
"github.com/pokt-network/poktroll/testutil/testkeyring"
@@ -25,7 +27,6 @@ import (
sharedtypes "github.com/pokt-network/poktroll/x/shared/types"
"github.com/pokt-network/poktroll/x/supplier/client/cli"
"github.com/pokt-network/poktroll/x/supplier/types"
"github.com/stretchr/testify/require"
)

// TODO_TECHDEBT: This should not be hardcoded once the num blocks per session is configurable.