diff --git a/go.mod b/go.mod index 54713890d..110e426fb 100644 --- a/go.mod +++ b/go.mod @@ -3,13 +3,8 @@ module github.com/NibiruChain/nibiru go 1.21 require ( - cosmossdk.io/api v0.7.0 // indirect - cosmossdk.io/errors v1.0.1 - cosmossdk.io/math v1.3.0 - cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d github.com/CosmWasm/wasmd v0.44.0 github.com/CosmWasm/wasmvm v1.5.0 - github.com/MakeNowJust/heredoc/v2 v2.0.1 github.com/NibiruChain/collections v0.5.0 // Consenus Engine @@ -19,15 +14,21 @@ require ( // Cosmos-SDK and IBC github.com/cosmos/cosmos-proto v1.0.0-beta.5 github.com/cosmos/cosmos-sdk v0.47.11 - github.com/cosmos/gogoproto v1.4.10 github.com/cosmos/ibc-go/v7 v7.3.2 + github.com/ethereum/go-ethereum v1.10.17 +) - // Else - github.com/cosmos/go-bip39 v1.0.0 +require ( + cosmossdk.io/api v0.7.0 // indirect + cosmossdk.io/errors v1.0.1 + cosmossdk.io/math v1.3.0 + cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d + github.com/MakeNowJust/heredoc/v2 v2.0.1 github.com/armon/go-metrics v0.4.1 github.com/btcsuite/btcd v0.24.0 github.com/btcsuite/btcd/btcutil v1.1.5 - github.com/ethereum/go-ethereum v1.10.17 + github.com/cosmos/go-bip39 v1.0.0 + github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf v1.3.3 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 diff --git a/gosdk/gosdk_test.go b/gosdk/gosdk_test.go index d14cc44b2..68bd6072d 100644 --- a/gosdk/gosdk_test.go +++ b/gosdk/gosdk_test.go @@ -44,7 +44,7 @@ func (s *TestSuite) RPCEndpoint() string { // SetupSuite implements the suite.SetupAllSuite interface. This function runs // prior to all of the other tests in the suite. func (s *TestSuite) SetupSuite() { - // testutil.BeforeIntegrationSuite(s.T()) + testutil.BeforeIntegrationSuite(s.T()) nibiru, err := gosdk.CreateBlockchain(s.T()) s.NoError(err) @@ -68,7 +68,7 @@ func (s *TestSuite) ConnectGrpc() { s.grpcConn = grpcConn } -func (s *TestSuite) TestNewQueryClient() { +func (s *TestSuite) DoTestNewQueryClient() { _, err := gosdk.NewQuerier(s.grpcConn) s.NoError(err) } @@ -80,13 +80,14 @@ func (s *TestSuite) TestNewNibiruSdk() { s.nibiruSdk = &nibiruSdk s.nibiruSdk.Keyring = s.val.ClientCtx.Keyring - s.T().Run("DoTestBroadcastMsgs", func(t *testing.T) { - s.DoTestBroadcastMsgs() - }) - s.T().Run("DoTestBroadcastMsgsGrpc", func(t *testing.T) { + + s.Run("DoTestBroadcastMsgs", func() { s.DoTestBroadcastMsgs() }) + s.Run("DoTestBroadcastMsgsGrpc", func() { s.NoError(s.network.WaitForNextBlock()) s.DoTestBroadcastMsgsGrpc() }) + s.Run("DoTestNewQueryClient", s.DoTestNewQueryClient) + s.Run("DoTestSequenceExpectations", s.DoTestSequenceExpectations) } // FIXME: Q: What is the node home for a local validator? diff --git a/gosdk/sequence_test.go b/gosdk/sequence_test.go index 904256032..e52f6565d 100644 --- a/gosdk/sequence_test.go +++ b/gosdk/sequence_test.go @@ -9,11 +9,11 @@ import ( "github.com/NibiruChain/nibiru/gosdk" ) -// TestSequenceExpectations validates the behavior of account sequence numbers +// DoTestSequenceExpectations validates the behavior of account sequence numbers // and transaction finalization in a blockchain network. It ensures that sequence // numbers increment correctly with each transaction and that transactions can be // queried successfully after the blocks are completed. -func (s *TestSuite) TestSequenceExpectations() { +func (s *TestSuite) DoTestSequenceExpectations() { t := s.T() t.Log("Get sequence and block") // Go to next block @@ -73,6 +73,6 @@ func (s *TestSuite) TestSequenceExpectations() { s.T().Log("Query each tx by hash (successfully)") for txHashHex := range txResults { _, err := s.nibiruSdk.TxByHash(txHashHex) - s.NoError(err) + s.Require().NoError(err) } }