mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 18:15:19 +00:00
ffd306ef52
* add grpc client * add e2e tests for grpc client * add grpc client readme * doc update * fix more doc issues * remove util namespace & move grpc client to chain * rename GrpcClient to Grpc * add 3rd party query clients * fix invalid url in readme * update e2e tests to use grpc client (#1787)
21 lines
516 B
Go
21 lines
516 B
Go
package e2e_test
|
|
|
|
import (
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
)
|
|
|
|
func (suite *IntegrationTestSuite) TestGrpcClientUtil_Account() {
|
|
// ARRANGE
|
|
// setup kava account
|
|
kavaAcc := suite.Kava.NewFundedAccount("account-test", sdk.NewCoins(ukava(1e5)))
|
|
|
|
// ACT
|
|
rsp, err := suite.Kava.Grpc.BaseAccount(kavaAcc.SdkAddress.String())
|
|
|
|
// ASSERT
|
|
suite.Require().NoError(err)
|
|
suite.Equal(kavaAcc.SdkAddress.String(), rsp.Address)
|
|
suite.Greater(rsp.AccountNumber, uint64(1))
|
|
suite.Equal(uint64(0), rsp.Sequence)
|
|
}
|