mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-03-30 15:08:28 +00:00
query machine in test
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
This commit is contained in:
parent
ee4f2bfda0
commit
24511388d2
@ -2,6 +2,7 @@ package machine
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
"planetmint-go/testutil"
|
||||
machinetypes "planetmint-go/x/machine/types"
|
||||
|
||||
@ -119,6 +120,16 @@ func (s *E2ETestSuite) TestAttestMachineREST() {
|
||||
s.T().Log("RESULT:")
|
||||
s.T().Log(string(r))
|
||||
|
||||
s.T().Log(string(pubKey))
|
||||
urlPubKey := url.QueryEscape(pubKey)
|
||||
s.T().Log(string(urlPubKey))
|
||||
|
||||
queryMachineUrl := fmt.Sprintf("%s/planetmint-go/machine/get_machine_by_public_key/%s", baseURL, urlPubKey)
|
||||
s.T().Log(string(queryMachineUrl))
|
||||
queryMachineRes, err := testutil.GetRequest(queryMachineUrl)
|
||||
s.Require().NoError(err)
|
||||
s.T().Log(string(queryMachineRes))
|
||||
|
||||
// Encode TX
|
||||
reqEncodeTx := fmt.Sprintf("%s/cosmos/tx/v1beta1/encode", baseURL)
|
||||
|
||||
|
@ -19,8 +19,10 @@ import (
|
||||
)
|
||||
|
||||
// Queryable pubkey for TestAttestMachine
|
||||
const pubKey = "A/ZrbETECRq5DNGJZ0aH0DjlV4Y1opMlRfGoEJH454eB"
|
||||
const mnemonic = "science humor project sword foil amazing exhibit afford kangaroo child pulse adapt camera trigger isolate pull approve october dragon critic vendor panic business valve"
|
||||
// const pubKey = "A/ZrbETECRq5DNGJZ0aH0DjlV4Y1opMlRfGoEJH454eB"
|
||||
// const mnemonic = "science humor project sword foil amazing exhibit afford kangaroo child pulse adapt camera trigger isolate pull approve october dragon critic vendor panic business valve"
|
||||
const pubKey = "AjKN6HiWucu1EBwzX0ACnkvomJiLRwq79oPxoLMY1zRw"
|
||||
const mnemonic = "helmet hedgehog lab actor weekend elbow pelican valid obtain hungry rocket decade tower gallery fit practice cart cherry giggle hair snack glance bulb farm"
|
||||
|
||||
// Struct definition of machine E2ETestSuite
|
||||
type E2ETestSuite struct {
|
||||
|
Loading…
x
Reference in New Issue
Block a user