testutil

package
v0.0.0-...-5aeaf24 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteJsonResponse

func WriteJsonResponse(t *testing.T, jsonO interface{}, w http.ResponseWriter)

Types

type MockErrorData

type MockErrorData struct {
	ErrorBody  string
	Errors     *[]string
	HTTPStatus int
}

func (*MockErrorData) MockErrorResponse

func (m *MockErrorData) MockErrorResponse(t *testing.T, w http.ResponseWriter, r *http.Request)

type ServeMockFunc

type ServeMockFunc func(t *testing.T, w http.ResponseWriter, r *http.Request)

type VaultServerMock

type VaultServerMock struct {
	T                   *testing.T
	Server              *httptest.Server
	CloseServer         func()
	ServeLookupSelfFunc func()
	ServeMocks          map[string]ServeMockFunc
}

func NewVaultServerMock

func NewVaultServerMock(t *testing.T) *VaultServerMock

func (*VaultServerMock) ServeHTTP

func (o *VaultServerMock) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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