helpers

package
v7.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const LongText = `` /* 2052-byte string literal not displayed */

Variables

This section is empty.

Functions

func ReadDocument

func ReadDocument(t *testing.T, filename string) *meta.Document

func ReadFixture

func ReadFixture(filename string) ([]byte, error)

func RunWithTestServer

func RunWithTestServer(ctx context.Context, service service,
	runner func(server *grpc.Server, conn *grpc.ClientConn) error) error

Provided with a HoardService executes runner in the context of a client-server connection over test buffer connection with all the hoard GRPC services registered on service

func WriteResult

func WriteResult(t *testing.T, data []byte)

func WriteResultWithExt

func WriteResultWithExt(t *testing.T, data []byte, postfix string)

Types

type DocumentTest

type DocumentTest struct {
	Meta meta.Meta   `json:"meta"`
	Data TestDocData `json:"data"`
}

type TestDocData

type TestDocData struct {
	Type    string `json:"type"`
	RawData []byte `json:"data"`
}

Jump to

Keyboard shortcuts

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