tests_e2e

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContentTypeJsonHeaders map[string]string = map[string]string{
	"Content-type": "application/json",
}

Functions

func JsonMatches added in v0.1.0

func JsonMatches(expectedJson map[string]interface{}) func(t *testing.T, response []byte)

func MockAssert

func MockAssert(assertConfig *mocklib.AssertConfig) []mocklib.ValidationError

func Request

func Request(config *mocklib.MockConfig, method, route, payload string, headers map[string]string) []byte

func RequestApiReset added in v0.1.1

func RequestApiReset(config *mocklib.MockConfig)

func RunMock

func RunMock(state *E2eState, command string) ([]byte, error)

func RunTest added in v0.1.0

func RunTest(
	t *testing.T,
	configurationFilePath,
	method,
	route string,
	assertionFunc func(t *testing.T, response []byte),
)

func StringMatches added in v0.1.0

func StringMatches(expected string) func(t *testing.T, response []byte)

Types

type E2eState

type E2eState struct {
	BinaryPath string
}

func NewState

func NewState() *E2eState

type KillMockFunc

type KillMockFunc func()

func RunMockBg

func RunMockBg(state *E2eState, command string) KillMockFunc

Jump to

Keyboard shortcuts

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