bnsapitest

package
v1.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertAPIResponse

func AssertAPIResponse(t testing.TB, w *httptest.ResponseRecorder, want []util.KeyValue)

func AssertAPIResponseBasic

func AssertAPIResponseBasic(t testing.TB, want, got io.Reader)

func NewAbciQueryResponse

func NewAbciQueryResponse(t testing.TB, keys [][]byte, m []weave.Persistent) md.AbciQueryResponse

func SequenceID

func SequenceID(n uint64) []byte

func SerializePairs

func SerializePairs(t testing.TB, keys [][]byte, models []weave.Persistent) ([]byte, []byte)

func TestBnsClientMock

func TestBnsClientMock(t *testing.T)

Types

type BnsClientMock

type BnsClientMock struct {
	GetResults  map[string]md.AbciQueryResponse
	PostResults map[string]map[string]md.AbciQueryResponse
	Err         error
}

func (*BnsClientMock) Get

func (mock *BnsClientMock) Get(ctx context.Context, path string, dest interface{}) error

func (*BnsClientMock) Post

func (mock *BnsClientMock) Post(ctx context.Context, data []byte, dest interface{}) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL