laconicd/tests/e2e/auction/grpc.go

27 lines
627 B
Go

package auction
import (
"fmt"
"github.com/cosmos/cosmos-sdk/testutil"
auctiontypes "git.vdb.to/cerc-io/laconic2d/x/auction"
)
func (ets *E2ETestSuite) TestQueryParamsGrpc() {
val := ets.network.Validators[0]
sr := ets.Require()
reqURL := fmt.Sprintf("%s/cerc/auction/v1/params", val.APIAddress)
ets.Run("valid request to get auction params", func() {
resp, err := testutil.GetRequest(reqURL)
ets.Require().NoError(err)
var params auctiontypes.QueryParamsResponse
err = val.ClientCtx.Codec.UnmarshalJSON(resp, &params)
sr.NoError(err)
sr.Equal(*params.GetParams(), auctiontypes.DefaultParams())
})
}